anton-vinogradov commented on code in PR #13323:
URL: https://github.com/apache/ignite/pull/13323#discussion_r3538916615
##########
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRebalanceTest.java:
##########
@@ -496,12 +496,14 @@ public void testRebalanceCancelOnSupplyError() throws
Exception {
forceCheckpoint();
- stopAllGrids();
+ // Keep the supplier (node 0) running: a full restart resets the
topology version, so entries
+ // recovered from persistence would outrank new writes and trip the
"Invalid version for inner
+ // update" assertion in GridCacheMapEntry (see
GridCacheVersionManager#offset).
+ stopGrid(1);
+ stopGrid(2);
Review Comment:
Nit (comment only): this documents the fix history — the version-inversion
flakiness — rather than the test's behavior. There's no behavioral reason node
0 must stay *alive* instead of being restarted: a restarted node would supply
the historical rebalance just as well. Keeping it up only sidesteps the flaky
version inversion, and that rationale belongs in the ticket, not the code.
Suggest dropping the comment:
```suggestion
stopGrid(1);
stopGrid(2);
```
##########
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRebalanceTest.java:
##########
@@ -532,12 +534,16 @@ public void testRebalanceCancelOnSupplyError() throws
Exception {
getTestTimeout()
);
+ // Block the demand message before failing the WAL read so the
supplier reliably hits the
+ // injected error mid-rebalance (a live supplier can otherwise finish
before the failure).
Review Comment:
Nit (comment only): worth keeping — this one explains the required ordering,
which is genuinely part of the test's behavior — but it can be a single line:
```suggestion
// Hold the demand until the WAL read is armed to fail, so the error
fires mid-rebalance.
```
--
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]