This is an automated email from the ASF dual-hosted git repository.

dcapwell pushed a commit to branch CASSANDRA-21061
in repository https://gitbox.apache.org/repos/asf/cassandra-accord.git

commit c86acdfee950b0829a1068bd02d0a25bbe347910
Author: David Capwell <[email protected]>
AuthorDate: Thu Dec 11 09:31:20 2025 -0800

    CASSANDRA-21061: always call Writes before Result
---
 accord-core/src/main/java/accord/coordinate/ExecuteTxn.java | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/accord-core/src/main/java/accord/coordinate/ExecuteTxn.java 
b/accord-core/src/main/java/accord/coordinate/ExecuteTxn.java
index d59e1a99..35f8d10b 100644
--- a/accord-core/src/main/java/accord/coordinate/ExecuteTxn.java
+++ b/accord-core/src/main/java/accord/coordinate/ExecuteTxn.java
@@ -389,11 +389,10 @@ public class ExecuteTxn extends ReadCoordinator<Result, 
ReadReply>
                 executeAt = new TimestampWithUniqueHlc(executeAt, uniqueHlc);
             }
 
-            // Always compute Result before Write to provide integrations with 
a predictable invocation order
-            // in case there is shared state between Result and Update. This 
can change if really needed
-            // just make sure to check the integrations to make sure it won't 
break anything
-            Result result = txn.result(txnId, executeAt, data);
+            // Always compute Writes before Result to provide integrations 
with a predictable invocation order
+            // in case there is shared state between Result and Update.
             Writes writes = txnId.is(Txn.Kind.Write) ? txn.execute(txnId, 
executeAt, data) : null;
+            Result result = txn.result(txnId, executeAt, data);
             adapter().persist(node, executor, allTopologies, route, ballot, 
flags, txnId, txn, executeAt, stableDeps, writes, result, takeCallback());
         }
         else


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to