belliottsmith commented on code in PR #1951:
URL: https://github.com/apache/cassandra/pull/1951#discussion_r1014227836


##########
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:
   Sure. It might also be reasonable to insist it is only invoked on commands 
where we know the transaction already.



##########
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:
   Sure. It might also be reasonable to insist it is only invoked on commands 
where we know the transaction already with a `Precondition` test



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

Reply via email to