Skip to main content

Module syncup_reader

Module syncup_reader 

Source
Expand description

REP-1 STEP 5 (A): the backward ReplicaSyncupReader.

Port of com.sleepycat.je.rep.stream.ReplicaSyncupReader (and the feeder’s FeederSyncupReader, which is the same backward log walk on the feeder side). Both scan the log BACKWARD from the last VLSN, yielding, per VLSN: the LSN, a record fingerprint (checksum, JE OutputWireRecord.match), and a sync-point flag (JE LogEntryType.isSyncPoint). The reader also counts the commits/aborts it steps over after the candidate matchpoint (MatchpointSearchResults.getNumPassedCommits), which crate::stream::syncup::verify_rollback needs for its HardRecovery decision.

The VLSN index alone records only VLSN→LSN; it does NOT keep the per-VLSN sync-flag, the record checksum, or the commit count. JE therefore RE-READS the log rather than trusting the index (see the class comment in ReplicaSyncupReader.java: “The reader must track whether it has passed a checkpoint, and therefore can not use the vlsn index to skip over entries.”). This reader re-reads too, reusing the same raw FileManager byte reads and VLSN-tagged header parsing the feeder’s EnvironmentLogScanner already uses.

Structs§

SyncupLogView
A scanned snapshot of one node’s replicated log, indexed by VLSN.
VlsnIndexView
A SyncupView backed by a live VlsnIndex (VLSN → LSN) plus the index’s range (getFirst/getLastSync/getLastTxnEnd).