[
https://issues.apache.org/jira/browse/IGNITE-21482?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Vladimir Steshin updated IGNITE-21482:
--------------------------------------
Description:
GridCacheVersionManager has wierd initialization of its last version:
{code:java}
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);
...
}
{code}
_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 value is read before any CRUD, followinf version
comparation of the version may fail. This happened in [link
title|http://example.com]
> Fix of initialization of the last version in GridCacheVersionManager
> --------------------------------------------------------------------
>
> Key: IGNITE-21482
> URL: https://issues.apache.org/jira/browse/IGNITE-21482
> Project: Ignite
> Issue Type: Improvement
> Reporter: Vladimir Steshin
> Priority: Minor
>
> GridCacheVersionManager has wierd initialization of its last version:
> {code:java}
> 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);
> ...
> }
> {code}
> _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 value is read before any CRUD, followinf version
> comparation of the version may fail. This happened in [link
> title|http://example.com]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)