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
Modifier and TypeMethodDescriptionbooleanWhether we need to run a full check.Run full check of bookies local data.runPreBootCheck(String reason) Run quick preboot check.
-
Method Details
-
runPreBootCheck
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
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:
IOException
-
runFullCheck
CompletableFuture<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.
-