dcapwell commented on code in PR #3494:
URL: https://github.com/apache/cassandra/pull/3494#discussion_r1735165392


##########
src/java/org/apache/cassandra/service/accord/AccordSafeCommand.java:
##########
@@ -127,9 +127,11 @@ public Command original()
         return original;
     }
 
-    public SavedCommand.SavedDiff diff()
+    public SavedCommand.Writer<TxnId> diff()
     {
-        return SavedCommand.diff(original, current);
+        if (original == current || current == null)

Review Comment:
   when we don't know the txn we don't have a `null` but a `Uninitialised`, 
this causes us to do more work than needed as we still allocate the diff.
   
   Fixed and tested in https://github.com/ifesdjeen/cassandra/pull/2



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