You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Andrew Medvedev (JIRA)" <ji...@apache.org> on 2018/04/22 11:02:00 UTC

[jira] [Updated] (IGNITE-8351) PME isStaleUpdate() method documentation mismatch

     [ https://issues.apache.org/jira/browse/IGNITE-8351?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Medvedev updated IGNITE-8351:
------------------------------------
    Description: 
Method org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionTopologyImpl#isStaleUpdate documents: "New partition map is stale if topology version or update sequence are less than of current map"

Code however checks for non-strong equality for updateSequence():

return currentMap != null &&
 (newMap.topologyVersion().compareTo(currentMap.topologyVersion()) < 0 ||
 newMap.topologyVersion().compareTo(currentMap.topologyVersion()) == 0 && newMap.updateSequence() <= currentMap.updateSequence());

 

We have lots of Stale update WARN msgs as in https://issues.apache.org/jira/browse/IGNITE-8226 (status is proposed to change from WARN to DEBUG, not yet merged) and on further research it looks that the code is right, the documentation is wrong.

 

Coupled together with WARN status messages however,  documentation for org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionTopologyImpl#isStaleUpdate  causes concerns...

 

  was:
Method org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionTopologyImpl#isStaleUpdate documents: "New partition map is stale if topology version or update sequence are less than of current map"

Code however checks for non-strong equality for updateSequence():

```return currentMap != null &&
 (newMap.topologyVersion().compareTo(currentMap.topologyVersion()) < 0 ||
 newMap.topologyVersion().compareTo(currentMap.topologyVersion()) == 0 && newMap.updateSequence() <= currentMap.updateSequence());```

 

We have lots of Stale update WARN msgs as in https://issues.apache.org/jira/browse/IGNITE-8226 (status is proposed to change from WARN to DEBUG, not yet merged) and on further research it looks that the code is right, the documentation is wrong.

 

Coupled together with WARN status messages however,  documentation for org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionTopologyImpl#isStaleUpdate  causes concerns...

 


> PME isStaleUpdate() method documentation mismatch
> -------------------------------------------------
>
>                 Key: IGNITE-8351
>                 URL: https://issues.apache.org/jira/browse/IGNITE-8351
>             Project: Ignite
>          Issue Type: Bug
>    Affects Versions: 2.4
>            Reporter: Andrew Medvedev
>            Priority: Major
>
> Method org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionTopologyImpl#isStaleUpdate documents: "New partition map is stale if topology version or update sequence are less than of current map"
> Code however checks for non-strong equality for updateSequence():
> return currentMap != null &&
>  (newMap.topologyVersion().compareTo(currentMap.topologyVersion()) < 0 ||
>  newMap.topologyVersion().compareTo(currentMap.topologyVersion()) == 0 && newMap.updateSequence() <= currentMap.updateSequence());
>  
> We have lots of Stale update WARN msgs as in https://issues.apache.org/jira/browse/IGNITE-8226 (status is proposed to change from WARN to DEBUG, not yet merged) and on further research it looks that the code is right, the documentation is wrong.
>  
> Coupled together with WARN status messages however,  documentation for org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionTopologyImpl#isStaleUpdate  causes concerns...
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)