Interface DataIntegrityCheck

  • All Known Implementing Classes:
    DataIntegrityCheckImpl

    public interface DataIntegrityCheck
    The interface for the data integrity check feature. This feature allows a bookie to handle data loss scenarios such as when running without the journal or after a disk failure has caused the loss of all data.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean needsFullCheck()
      Whether we need to run a full check.
      java.util.concurrent.CompletableFuture<java.lang.Void> runFullCheck()
      Run full check of bookies local data.
      java.util.concurrent.CompletableFuture<java.lang.Void> runPreBootCheck​(java.lang.String reason)
      Run quick preboot check.
    • Method Detail

      • runPreBootCheck

        java.util.concurrent.CompletableFuture<java.lang.Void> runPreBootCheck​(java.lang.String reason)
        Run quick preboot check. This check should do enough to ensure that it is safe to complete the boot sequence without compromising correctness. To this end, if it finds that this bookie is part of the last ensemble of an unclosed ledger, it must prevent the bookie from being able store new entries for that ledger and must prevent the bookie from taking part in the discovery of the last entry of that ledger.
      • needsFullCheck

        boolean needsFullCheck()
                        throws java.io.IOException
        Whether we need to run a full check. This condition can be set by the runPreBoot() call to run a full check in the background once the bookie is running. This can later be used to run the full check periodically, or to exponentially backoff and retry when some transient condition prevents a ledger being fixed during a full check.
        Throws:
        java.io.IOException
      • runFullCheck

        java.util.concurrent.CompletableFuture<java.lang.Void> runFullCheck()
        Run full check of bookies local data. This check should ensure that if the metadata service states that it should have an entry, then it should have that entry. If the entry is missing, it should copy it from another available source.