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


##########
test/unit/org/apache/cassandra/service/accord/AccordTestUtils.java:
##########
@@ -517,12 +517,9 @@ public static void 
appendCommandsBlocking(AccordCommandStore commandStore, Comma
 
     public static void appendCommandsBlocking(AccordCommandStore commandStore, 
Command before, Command after)
     {
-        SavedCommand.SavedDiff diff = SavedCommand.diff(before, after);
-        if (diff != null)
-        {
-            Condition condition = Condition.newOneTimeCondition();
-            commandStore.appendCommands(Collections.singletonList(diff), null, 
condition::signal);
-            condition.awaitUninterruptibly(30, TimeUnit.SECONDS);
-        }
+        SavedCommand.Writer<TxnId> diff = new SavedCommand.DiffWriter(before, 
after);

Review Comment:
   should we try to respect the logic in 
`org.apache.cassandra.service.accord.AccordSafeCommand#diff`?  Maybe make this 
a static function so this code and that function can both use?  if 
`before=null, after=Uninitialised` its a no-op... 



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