Class SyncThread

  • All Implemented Interfaces:

    class SyncThread
    extends java.lang.Object
    implements Checkpointer
    SyncThread is a background thread which help checkpointing ledger storage when a checkpoint is requested. After a ledger storage is checkpointed, the journal files added before checkpoint will be garbage collected.

    After all data has been persisted to ledger index files and entry loggers, it is safe to complete a checkpoint by persisting the log marker to disk. If bookie failed after persist log mark, bookie is able to relay journal entries started from last log mark without losing any entries.

    Those journal files whose id are less than the log id in last log mark, could be removed safely after persisting last log mark. We provide a setting to let user keeping number of old journal files which may be used for manual recovery in critical disaster.