Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
badrishc committed Mar 8, 2025
1 parent bbad4f0 commit af870fb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ public override void GlobalBeforeEnteringState(SystemState next, StateMachineDri
store._lastSnapshotCheckpoint.Dispose();
store._hybridLogCheckpointToken = guid;
store.InitializeHybridLogCheckpoint(store._hybridLogCheckpointToken, next.Version);
store._hybridLogCheckpoint.info.version = next.Version;
store._hybridLogCheckpoint.info.nextVersion = targetVersion == -1 ? next.Version + 1 : targetVersion;
store.StreamingSnapshotScanPhase1();
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ public void ClusterDBVersionAlignmentDisklessSync([Values] bool disableObjects,
var primaryVersion = context.clusterTestUtils.GetStoreCurrentVersion(primaryIndex, isMainStore: true, logger: context.logger);
var replicaOneVersion = context.clusterTestUtils.GetStoreCurrentVersion(replicaOneIndex, isMainStore: true, logger: context.logger);

// With unified store, versions increase per scan (main and object)
// so expected versions depend on whether objects are disabled or not
var expectedVersion1 = disableObjects ? 2 : 3;
ClassicAssert.AreEqual(expectedVersion1, primaryVersion);
ClassicAssert.AreEqual(primaryVersion, replicaOneVersion);
Expand All @@ -260,6 +262,9 @@ public void ClusterDBVersionAlignmentDisklessSync([Values] bool disableObjects,
primaryVersion = context.clusterTestUtils.GetStoreCurrentVersion(primaryIndex, isMainStore: true, logger: context.logger);
replicaOneVersion = context.clusterTestUtils.GetStoreCurrentVersion(replicaOneIndex, isMainStore: true, logger: context.logger);
var replicaTwoVersion = context.clusterTestUtils.GetStoreCurrentVersion(replicaTwoIndex, isMainStore: true, logger: context.logger);

// With unified store, versions increase per scan (main and object)
// so expected versions depend on whether objects are disabled or not
var expectedVersion2 = disableObjects ? 3 : 5;
ClassicAssert.AreEqual(expectedVersion2, primaryVersion);
ClassicAssert.AreEqual(primaryVersion, replicaTwoVersion);
Expand All @@ -274,6 +279,9 @@ public void ClusterDBVersionAlignmentDisklessSync([Values] bool disableObjects,
primaryVersion = context.clusterTestUtils.GetStoreCurrentVersion(primaryIndex, isMainStore: true, logger: context.logger);
replicaOneVersion = context.clusterTestUtils.GetStoreCurrentVersion(replicaOneIndex, isMainStore: true, logger: context.logger);
replicaTwoVersion = context.clusterTestUtils.GetStoreCurrentVersion(replicaTwoIndex, isMainStore: true, logger: context.logger);

// With unified store, versions increase per scan (main and object)
// so expected versions depend on whether objects are disabled or not
var expectedVersion3 = disableObjects ? 4 : 7;
ClassicAssert.AreEqual(expectedVersion3, primaryVersion);
ClassicAssert.AreEqual(primaryVersion, replicaOneVersion);
Expand Down

0 comments on commit af870fb

Please sign in to comment.