Skip to content

Commit

Permalink
Fix edge case for incremental snapshot (#858)
Browse files Browse the repository at this point in the history
  • Loading branch information
badrishc authored Aug 3, 2023
1 parent 29cf302 commit 5bee94b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions cs/src/core/Index/Synchronization/HybridLogCheckpointTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,6 @@ public override void GlobalBeforeEnteringState<Key, Value>(SystemState next, Fas
case Phase.WAIT_FLUSH:
base.GlobalBeforeEnteringState(next, faster);
faster._hybridLogCheckpoint.info.finalLogicalAddress = faster.hlog.GetTailAddress();
faster._hybridLogCheckpoint.info.snapshotStartFlushedLogicalAddress = faster.hlog.FlushedUntilAddress;

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

0 comments on commit 5bee94b

Please sign in to comment.