[
https://issues.apache.org/jira/browse/ZOOKEEPER-4743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
HaiyuanZhao updated ZOOKEEPER-4743:
-----------------------------------
Description:
DataVersion is a 32-bit signed integer. When dataVersion exceeds Integer.MAX,
an overflow problem will occur.
According to my own understanding, overflow itself is not a big problem. The
core of dataVersion is to describe the causal order. Two different values can
be used to determine the happened-before relationship between the two.
Then even if an overflow occurs, except for the scenario where Integer.MAX is
larger than Integer.MAX+1, compared with any value in other scenarios and the
value + 1, the latter is always larger than the former, and it is used to
implement CAS updates in line with design expectations.
was:WIP
> (WIP)Jump from -2 to 0 when zookeeper increments znode dataVersion
> ------------------------------------------------------------------
>
> Key: ZOOKEEPER-4743
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4743
> Project: ZooKeeper
> Issue Type: Improvement
> Reporter: HaiyuanZhao
> Priority: Major
>
> DataVersion is a 32-bit signed integer. When dataVersion exceeds Integer.MAX,
> an overflow problem will occur.
> According to my own understanding, overflow itself is not a big problem. The
> core of dataVersion is to describe the causal order. Two different values
> can be used to determine the happened-before relationship between the two.
> Then even if an overflow occurs, except for the scenario where Integer.MAX is
> larger than Integer.MAX+1, compared with any value in other scenarios and the
> value + 1, the latter is always larger than the former, and it is used to
> implement CAS updates in line with design expectations.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)