Skip to content

Commit 5bee94b

Browse files
authored
Fix edge case for incremental snapshot (#858)
1 parent 29cf302 commit 5bee94b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

cs/src/core/Index/Synchronization/HybridLogCheckpointTask.cs

+1-4
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,6 @@ public override void GlobalBeforeEnteringState<Key, Value>(SystemState next, Fas
322322
case Phase.WAIT_FLUSH:
323323
base.GlobalBeforeEnteringState(next, faster);
324324
faster._hybridLogCheckpoint.info.finalLogicalAddress = faster.hlog.GetTailAddress();
325-
faster._hybridLogCheckpoint.info.snapshotStartFlushedLogicalAddress = faster.hlog.FlushedUntilAddress;
326325

327326
if (faster._hybridLogCheckpoint.deltaLog == null)
328327
{
@@ -337,7 +336,7 @@ public override void GlobalBeforeEnteringState<Key, Value>(SystemState next, Fas
337336
// resuming epoch protection if necessary. Correctness is not affected as we will
338337
// only read safe pages during recovery.
339338
faster.hlog.AsyncFlushDeltaToDevice(
340-
faster._hybridLogCheckpoint.info.snapshotStartFlushedLogicalAddress,
339+
faster.hlog.FlushedUntilAddress,
341340
faster._hybridLogCheckpoint.info.finalLogicalAddress,
342341
faster._lastSnapshotCheckpoint.info.finalLogicalAddress,
343342
faster._hybridLogCheckpoint.prevVersion,
@@ -346,8 +345,6 @@ public override void GlobalBeforeEnteringState<Key, Value>(SystemState next, Fas
346345
faster.ThrottleCheckpointFlushDelayMs);
347346
break;
348347
case Phase.PERSISTENCE_CALLBACK:
349-
// Set actual FlushedUntil to the latest possible data in main log that is on disk
350-
faster._hybridLogCheckpoint.info.flushedLogicalAddress = faster.hlog.FlushedUntilAddress;
351348
CollectMetadata(next, faster);
352349
faster.WriteHybridLogIncrementalMetaInfo(faster._hybridLogCheckpoint.deltaLog);
353350
faster._hybridLogCheckpoint.info.deltaTailAddress = faster._hybridLogCheckpoint.deltaLog.TailAddress;

0 commit comments

Comments
 (0)