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/12/01 16:09:33 UTC

[GitHub] [cassandra-accord] belliottsmith commented on a diff in pull request #14: Invalidation fixes/improvements

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


##########
accord-core/src/main/java/accord/local/Command.java:
##########
@@ -979,6 +985,9 @@ else if (existingRanges != additionalRanges && !route().covers(additionalRanges)
         if (!validate(ensurePartialTxn, existingRanges, additionalRanges, covers(partialTxn()), covers(partialTxn), "txn", partialTxn))
             return false;
 
+        if (partialTxn != null && kind() != null && !kind().equals(partialTxn.kind()))
+            throw new IllegalArgumentException("Transaction has different kind to the definition we previously received");

Review Comment:
   Cassandra side tries to serialise with the kind, which may be known by Accept without the transaction definition being known, so we need to persist it separately. This is just an internal consistency check now we're storing it.
   
   I would like to _very soon_ follow-up by refactoring `TxnId` to persist the `Kind` as this is much simpler and avoids any of these problems. But we have to draw a line somewhere for any given patch.



-- 
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