[ 
https://issues.apache.org/jira/browse/GEODE-5908?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16671831#comment-16671831
 ] 

ASF subversion and git services commented on GEODE-5908:
--------------------------------------------------------

Commit fa9813d323f5d58c14fd4b505738f2021ec83086 in geode's branch 
refs/heads/develop from zhouxh
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=fa9813d ]

Revert "GEODE-5908: DiskStoreID.compare should compare mostSig, then leastSig 
(#2676)"

This reverts commit ab5fafbe188de4ffb30c0ddff926a42a713da914.

This fix conceptually is correct, but it somehow caused more data mismatch in
concurrency conflicts handling. Since there's no found bug related with this
fix, revert it for now.


> DiskStoreID.compare treat different DiskStoreID with same leastSig as equal
> ---------------------------------------------------------------------------
>
>                 Key: GEODE-5908
>                 URL: https://issues.apache.org/jira/browse/GEODE-5908
>             Project: Geode
>          Issue Type: Bug
>          Components: core
>            Reporter: xiaojian zhou
>            Assignee: xiaojian zhou
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.8.0
>
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> When reviewing code, I found this actually is a bug, and will impact our 
> checkForConflict() to throw CME in following case:
> stamps's DiskStoreID is: 5a42b9ec2e6e45db-87559e428bd3ad67
> tag's DiskStoreID is: a870e3a0126e4b0d-87559e428bd3ad67
> tag is actually bigger than stamp's. But in current code, they will be 
> treated as equal. 
> I wrote a junit test to reproduce this problem.
>  
> The root cause is:
> *diff --git 
> a/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/DiskStoreID.java
>  
> b/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/DiskStoreID.java*
> *index 601d24899..0392e92dd 100644*
> *--- 
> a/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/DiskStoreID.java*
> *+++ 
> b/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/DiskStoreID.java*
> @@ -80,7 +80,7 @@ public class DiskStoreID implements 
> VersionSource<DiskStoreID>, Serializable {
>        return 1;
>      }
>      int result = Long.signum(mostSig - tagID.mostSig);
> -    if (result != 0) {
> +    if (result == 0) {
>        result = Long.signum(leastSig - tagID.leastSig);
>      }
>      return result;



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

Reply via email to