IGNITE-28869 Fix IgniteWalRebalanceTest.testRebalanceCancelOnSupplyError#13323
Conversation
anton-vinogradov
left a comment
There was a problem hiding this comment.
Reviewed both the diagnosis and the fix — the root cause and the approach look correct. I traced it end to end:
- A cache version's
topVerfield isreadyTopologyVersion + offset(GridCacheVersionManager.next(topVer)), whereoffset = (gridStartTime - TOP_VER_BASE_TIME) / 1000(seconds), captured inonLocalJoin. GridCacheVersion.compareTocomparestopologyVersion()first, sooffsetdominates the resetreadyTopologyVersion.- The failing assertion is
ATOMIC_VER_COMPARATOR.compare(entry.ver, newVer) <= 0inGridCacheMapEntry(Invalid version for inner update), i.e. the new write's version must be>=the recovered entry's version.
On a fast full-cluster restart gridStartTime advances by less than the topology-version reset, so the new writes get a strictly lower topVer and trip the assertion. The pause is placed correctly — before startGrid(0), since offset is captured at node-0 join — and makes the new offset exceed the old one by ~5, which comfortably covers the ~2 topology-version gap (3-node+activate vs 1-node+activate). cleanPersistenceDir() runs per test, so the gap is intra-test only and the margin is large; the fix is deterministic (wall clock only moves forward), not a new source of flakiness. LGTM.
One optional nit: the 5s constant is implicitly tied to the topology this test builds. It's fine today, but worth spelling out the rationale so a future change to the started-grid count doesn't silently shrink the margin — inline suggestion below.
Also worth attaching the TC Bot green visa to the ticket before merge.
anton-vinogradov
left a comment
There was a problem hiding this comment.
Now that the PR carries the deterministic version, two comment-only nits on the newly added comments (no code changes, both optional).
Co-authored-by: Anton Vinogradov <av@apache.org>
TCBot Test Analysis
Possible Blockers (0)No blockers found. New Tests (0)No new tests found. |
Thank you for submitting the pull request to the Apache Ignite.
In order to streamline the review of the contribution
we ask you to ensure the following steps have been taken:
The Contribution Checklist
The description explains WHAT and WHY was made instead of HOW.
The following pattern must be used:
IGNITE-XXXX Change summarywhereXXXX- number of JIRA issue.(see the Maintainers list)
the
green visaattached to the JIRA ticket (see tabPR Checkat TC.Bot - Instance 1 or TC.Bot - Instance 2)Notes
If you need any help, please email dev@ignite.apache.org or ask anу advice on http://asf.slack.com #ignite channel.