This is an automated email from the ASF dual-hosted git repository.
maedhroz pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-accord.git
The following commit(s) were added to refs/heads/trunk by this push:
new 0cc9e27 use equals() rather than reference equality for excluding
ourselves from the dependency builder
0cc9e27 is described below
commit 0cc9e273b2eaa37d82a1ae1ac2681aec65aa0f6d
Author: Caleb Rackliffe <[email protected]>
AuthorDate: Thu Feb 2 11:33:30 2023 -0600
use equals() rather than reference equality for excluding ourselves from
the dependency builder
patch by Benedict; reviewed by Caleb Rackliffe for CASSANDRA-18218
---
accord-core/src/main/java/accord/messages/PreAccept.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/accord-core/src/main/java/accord/messages/PreAccept.java
b/accord-core/src/main/java/accord/messages/PreAccept.java
index 9b171f0..8426cb7 100644
--- a/accord-core/src/main/java/accord/messages/PreAccept.java
+++ b/accord-core/src/main/java/accord/messages/PreAccept.java
@@ -232,7 +232,7 @@ public class PreAccept extends
WithUnsynced<PreAccept.PreAcceptReply>
commandStore.mapReduce(keys, ranges, testKind, STARTED_BEFORE,
executeAt, ANY_DEPS, null, null, null,
(keyOrRange, testTxnId, testExecuteAt, in) -> {
// TODO (easy, efficiency): either pass txnId as parameter
or encode this behaviour in a specialised builder to avoid extra allocations
- if (testTxnId != txnId)
+ if (!testTxnId.equals(txnId))
in.add(keyOrRange, testTxnId);
return in;
}, builder, null);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]