You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ma...@apache.org on 2023/02/02 20:59:12 UTC
[cassandra-accord] branch trunk updated: use equals() rather than reference equality for excluding ourselves from the dependency builder
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 <ca...@gmail.com>
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: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org