ifesdjeen commented on code in PR #4206:
URL: https://github.com/apache/cassandra/pull/4206#discussion_r2155641569


##########
src/java/org/apache/cassandra/service/accord/AccordJournal.java:
##########
@@ -588,7 +588,15 @@ private static void serialize(Command command, int flags, 
DataOutputPlus out, Ve
                         ResultSerializers.result.serialize(command.result(), 
out);
                         break;
                     case CLEANUP:
-                        throw new IllegalStateException();
+                        Cleanup cleanup;
+                        switch (command.saveStatus())
+                        {
+                            default: throw new 
UnhandledEnum(command.saveStatus());
+                            case Erased: cleanup = Cleanup.ERASE; break;
+                            case Invalidated: cleanup = Cleanup.INVALIDATE;

Review Comment:
   nit: break on this line



##########
src/java/org/apache/cassandra/service/accord/AccordJournal.java:
##########
@@ -588,7 +588,15 @@ private static void serialize(Command command, int flags, 
DataOutputPlus out, Ve
                         ResultSerializers.result.serialize(command.result(), 
out);
                         break;
                     case CLEANUP:
-                        throw new IllegalStateException();
+                        Cleanup cleanup;
+                        switch (command.saveStatus())
+                        {
+                            default: throw new 
UnhandledEnum(command.saveStatus());
+                            case Erased: cleanup = Cleanup.ERASE; break;
+                            case Invalidated: cleanup = Cleanup.INVALIDATE;

Review Comment:
   nit: break for this case



-- 
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-unsubscr...@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org
For additional commands, e-mail: pr-h...@cassandra.apache.org

Reply via email to