Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
GridCacheVersionManager has wierd initialization of its last version:
public void onLocalJoin(long topVer) { long startTime = cctx.kernalContext().discovery().gridStartTime(); if (startTime != 0) offset = (int)((startTime - TOP_VER_BASE_TIME) / 1000); last = new GridCacheVersion(0, order.get(), 0, dataCenterId); ... }
topVer, nodeOrder and offset are ignored. While GridCacheVersion says 'topVer Topology version plus number of seconds from the start time of the first grid node.'. If this 'zeroed' value is read before any CRUD, a following comparation of the versions may fail. This happened in IGNITE-21236.
We should revise the initialization code. The assumed fix is:
last = new GridCacheVersion((int)topVer + offset, order.get(), (int)cctx.localNode().order(), dataCenterId);
Or we should remove this last version at all. Looks like we need only the order.
Attachments
Issue Links
- is related to
-
IGNITE-21236 Handle DataStreamer entry version in dump
-
- Resolved
-
- relates to
-
IGNITE-21485 Refactoring of lost code and codestyle related to GridCacheVersion
-
- Resolved
-
- links to