sanpwc commented on code in PR #759:
URL: https://github.com/apache/ignite-3/pull/759#discussion_r857696145
##########
modules/core/src/main/java/org/apache/ignite/internal/causality/VersionedValue.java:
##########
@@ -276,8 +276,8 @@ public void set(long causalityToken, T value) {
history.put(causalityToken, initFut);
}
- assert actualToken0 == NOT_INITIALIZED || actualToken0 + 1 ==
causalityToken : IgniteStringFormatter.format(
- "Token must be greater than actual by exactly 1 [token={},
actual={}]", causalityToken, actualToken0);
+ assert actualToken0 == NOT_INITIALIZED || actualToken0 <=
causalityToken : IgniteStringFormatter.format(
Review Comment:
Here and bellow. Seems that according to current logic of assignments key
registration on start it's not possible to have `actualToken0 ==
causalityToken`, only `actualToken0 < causalityToken` is valid.
Also `Token must be greater than or equal to actual -> Token must be
greater than`
WDYT?
##########
modules/core/src/main/java/org/apache/ignite/internal/causality/VersionedValue.java:
##########
@@ -276,8 +276,8 @@ public void set(long causalityToken, T value) {
history.put(causalityToken, initFut);
}
- assert actualToken0 == NOT_INITIALIZED || actualToken0 + 1 ==
causalityToken : IgniteStringFormatter.format(
- "Token must be greater than actual by exactly 1 [token={},
actual={}]", causalityToken, actualToken0);
+ assert actualToken0 == NOT_INITIALIZED || actualToken0 <=
causalityToken : IgniteStringFormatter.format(
Review Comment:
Here and bellow. Seems that according to current logic of assignments key
registration on start, it's not possible to have `actualToken0 ==
causalityToken`, only `actualToken0 < causalityToken` is valid.
Also `Token must be greater than or equal to actual -> Token must be
greater than`
WDYT?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]