sk0x50 commented on code in PR #5245:
URL: https://github.com/apache/ignite-3/pull/5245#discussion_r1963451944


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/raft/PartitionListener.java:
##########
@@ -263,10 +267,14 @@ public IgniteBiTuple<Serializable, Boolean> 
processCommand(
         } else if (command instanceof PrimaryReplicaChangeCommand) {
             result = 
handlePrimaryReplicaChangeCommand((PrimaryReplicaChangeCommand) command, 
commandIndex, commandTerm);
         } else if (command instanceof VacuumTxStatesCommand) {
-            result = handleVacuumTxStatesCommand((VacuumTxStatesCommand) 
command, commandIndex, commandTerm);
+            if (!enabledColocation()) {
+                result = 
vacuumTxStatesCommandHandler.handle((VacuumTxStatesCommand) command, 
commandIndex, commandTerm);
+            }
         } else if (command instanceof UpdateMinimumActiveTxBeginTimeCommand) {
             result = 
minimumActiveTxTimeCommandHandler.handle((UpdateMinimumActiveTxBeginTimeCommand)
 command, commandIndex);
-        } else {
+        }
+
+        if (result == null) {

Review Comment:
   In that case, you need to write something like as follows:
   ```
       if (request instanceof A) {
           if (!enabledColocation) {
               // handle the request
              ... 
           } else {
               throw new AssrtionError("...)
           }
       } else if (request instanceof B) {
           if (!enabledColocation) {
               // handle the request
              ... 
           } else {
               throw new AssrtionError("...)
           }
      ...  
   ```
   
   IMHO this approach is a bit messy. Anyway it will be cleaned under 
[IGNITE-22522](https://issues.apache.org/jira/browse/IGNITE-22522)



-- 
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: notifications-unsubscr...@ignite.apache.org

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

Reply via email to