Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,9 @@ public override void GlobalBeforeEnteringState<Key, Value>(SystemState next, Tsa
store._hybridLogCheckpoint.snapshotFileDevice.Initialize(store.hlog.GetSegmentSize());
store._hybridLogCheckpoint.snapshotFileObjectLogDevice.Initialize(-1);

store._hybridLogCheckpoint.info.snapshotStartFlushedLogicalAddress = store.hlog.FlushedUntilAddress;
// If we are using a NullDevice then storage tier is not enabled and FlushedUntilAddress may be ReadOnlyAddress; get all records in memory.
store._hybridLogCheckpoint.info.snapshotStartFlushedLogicalAddress = store.hlog.IsNullDevice ? store.hlog.HeadAddress : store.hlog.FlushedUntilAddress;

long startPage = store.hlog.GetPage(store._hybridLogCheckpoint.info.snapshotStartFlushedLogicalAddress);
long endPage = store.hlog.GetPage(store._hybridLogCheckpoint.info.finalLogicalAddress);
if (store._hybridLogCheckpoint.info.finalLogicalAddress >
Expand All @@ -251,7 +253,8 @@ public override void GlobalBeforeEnteringState<Key, Value>(SystemState next, Tsa
break;
case Phase.PERSISTENCE_CALLBACK:
// Set actual FlushedUntil to the latest possible data in main log that is on disk
store._hybridLogCheckpoint.info.flushedLogicalAddress = store.hlog.FlushedUntilAddress;
// If we are using a NullDevice then storage tier is not enabled and FlushedUntilAddress may be ReadOnlyAddress; get all records in memory.
store._hybridLogCheckpoint.info.flushedLogicalAddress = store.hlog.IsNullDevice ? store.hlog.HeadAddress : store.hlog.FlushedUntilAddress;
base.GlobalBeforeEnteringState(next, store);
store._lastSnapshotCheckpoint = store._hybridLogCheckpoint.Transfer();
break;
Expand Down