anton-vinogradov commented on code in PR #13323:
URL: https://github.com/apache/ignite/pull/13323#discussion_r3538366169
##########
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRebalanceTest.java:
##########
@@ -498,6 +499,14 @@ public void testRebalanceCancelOnSupplyError() throws
Exception {
stopAllGrids();
+ // Wait briefly before restarting to ensure
GridCacheVersionManager.offset grows enough.
+ // GridCacheVersion.topVer = readyTopologyVersion + offset, where
offset = (gridStartTime - baseTime)/1000.
+ // After restart, readyTopologyVersion resets to a small value (1-3),
while recovered data retains
+ // topVer from the previous session. This 5-second pause ensures the
new offset exceeds the previous
+ // one by enough to compensate for the lower readyTopologyVersion,
preventing
+ // "Invalid version for inner update" assertion failures.
Review Comment:
Optional: mention that versions compare by `topVer` first (the reason
`offset` dominates) and that the gap being covered is only a couple of topology
versions, so `5s` is deliberately generous rather than a tuned value:
```suggestion
// Pause before the restart so GridCacheVersionManager.offset can
grow.
// A cache version's topVer = readyTopologyVersion + offset, where
// offset = (gridStartTime - TOP_VER_BASE_TIME) / 1000 (seconds),
and versions
// are compared by topVer first. After a full cluster restart
readyTopologyVersion
// drops back to a few units while recovered entries keep the higher
topVer from
// the previous session; without a pause the new writes get a lower
version and
// trip the "Invalid version for inner update" assertion. The gap to
cover is only
// a couple of topology versions, so 5 seconds is deliberately
generous.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]