Class TransactionalEntryLogCompactor.UpdateIndexPhase

  • Enclosing class:
    TransactionalEntryLogCompactor

    class TransactionalEntryLogCompactor.UpdateIndexPhase
    extends TransactionalEntryLogCompactor.CompactionPhase
    Assume we're compacting log 1 to log 3. This phase is to update the entry locations and flush the index. When the phase start, there should be a compacted file like "3.log.1.compacted", where 3 is the new compaction logId and 1 is the old entry logId. After the index the flushed successfully, a hardlink "3.log" file should be created, and 3.log.1.compacted file should be deleted to indicate the phase is succeed.

    This phase can also used to recover partially flushed index when we pass isInRecovery=true