You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2022/11/09 18:57:26 UTC

[GitHub] [cassandra-accord] belliottsmith commented on a diff in pull request #12: Add transaction expiration

belliottsmith commented on code in PR #12:
URL: https://github.com/apache/cassandra-accord/pull/12#discussion_r1018307936


##########
accord-core/src/main/java/accord/impl/InMemoryCommandStore.java:
##########
@@ -163,7 +157,17 @@ public long latestEpoch()
         }
 
         @Override
-        public Timestamp maxConflict(Keys keys)
+        public Timestamp preaccept(TxnId txnId, Keys keys)
+        {
+            Timestamp max = maxConflict(keys);
+            long epoch = latestEpoch();
+            if (txnId.compareTo(max) > 0 && txnId.epoch >= epoch && !agent.isExpired(txnId, time.now()))

Review Comment:
   This permits a majority of remote replicas to also collectively reject an expired transaction received from a long running coordinator  - and also means that recovery doesn't accidentally register a preaccept that can be counted towards the original coordination. Though perhaps for that we should just explicitly refuse to use the original ballot for recovery.
   
   This is all sort of arbitrary, so happy with any of these approaches.



-- 
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: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org