belliottsmith commented on code in PR #1951:
URL: https://github.com/apache/cassandra/pull/1951#discussion_r1014518507
##########
src/java/org/apache/cassandra/service/accord/AccordCommand.java:
##########
@@ -524,22 +535,29 @@ public Timestamp executeAt()
}
@Override
- public void executeAt(Timestamp timestamp)
+ public Txn.Kind kind()
+ {
+ PartialTxn txn = partialTxn.get();
+ return txn == null ? null : txn.kind();
Review Comment:
Hmm, so thinking about this more carefully, this is another unexpected
side-effect of permitting `Accept` without a preceding PreAccept, as we need to
know the `kind` to correctly adopt dependencies. This is probably fine, as the
transaction will be visible to a quorum from its PreAccept, but a node that has
not PreAccepted but has Accepted may fail to report the transaction as a
dependency as a result.
I need to give it a little thought, but I am inclined to pack the `Kind`
into the `TxnId` as it is simple, cheap (a single bit), and potentially
simplifies other dependency analysis in future (since this would also be
transmitted in all deps)
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]