sanpwc commented on code in PR #4821:
URL: https://github.com/apache/ignite-3/pull/4821#discussion_r1898302027


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/raft/PartitionListener.java:
##########
@@ -241,30 +215,46 @@ private void 
onWriteBusy(Iterator<CommandClosure<WriteCommand>> iterator) {
             storage.acquirePartitionSnapshotsReadLock();
 
             try {
+                boolean[] applied = {false};
+
                 if (command instanceof UpdateCommand) {
-                    result = handleUpdateCommand((UpdateCommand) command, 
commandIndex, commandTerm);
+                    result = handleUpdateCommand((UpdateCommand) command, 
commandIndex, commandTerm, applied);
                 } else if (command instanceof UpdateAllCommand) {
-                    result = handleUpdateAllCommand((UpdateAllCommand) 
command, commandIndex, commandTerm);
+                    result = handleUpdateAllCommand((UpdateAllCommand) 
command, commandIndex, commandTerm, applied);
                 } else if (command instanceof FinishTxCommand) {
-                    result = handleFinishTxCommand((FinishTxCommand) command, 
commandIndex, commandTerm);
+                    result = handleFinishTxCommand((FinishTxCommand) command, 
commandIndex, commandTerm, applied);
                 } else if (command instanceof WriteIntentSwitchCommand) {
-                    handleWriteIntentSwitchCommand((WriteIntentSwitchCommand) 
command, commandIndex, commandTerm);
+                    handleWriteIntentSwitchCommand((WriteIntentSwitchCommand) 
command, commandIndex, commandTerm, applied);
                 } else if (command instanceof SafeTimeSyncCommand) {
-                    handleSafeTimeSyncCommand((SafeTimeSyncCommand) command, 
commandIndex, commandTerm);
+                    handleSafeTimeSyncCommand((SafeTimeSyncCommand) command, 
commandIndex, commandTerm, applied);
                 } else if (command instanceof BuildIndexCommand) {
-                    handleBuildIndexCommand((BuildIndexCommand) command, 
commandIndex, commandTerm);
+                    handleBuildIndexCommand((BuildIndexCommand) command, 
commandIndex, commandTerm, applied);
                 } else if (command instanceof PrimaryReplicaChangeCommand) {
-                    
handlePrimaryReplicaChangeCommand((PrimaryReplicaChangeCommand) command, 
commandIndex, commandTerm);
+                    
handlePrimaryReplicaChangeCommand((PrimaryReplicaChangeCommand) command, 
commandIndex, commandTerm, applied);
                 } else if (command instanceof VacuumTxStatesCommand) {
-                    handleVacuumTxStatesCommand((VacuumTxStatesCommand) 
command, commandIndex, commandTerm);
+                    handleVacuumTxStatesCommand((VacuumTxStatesCommand) 
command, commandIndex, commandTerm, applied);
                 } else if (command instanceof 
UpdateMinimumActiveTxBeginTimeCommand) {
-                    
handleUpdateMinimalActiveTxTimeCommand((UpdateMinimumActiveTxBeginTimeCommand) 
command, commandIndex, commandTerm);
+                    
handleUpdateMinimalActiveTxTimeCommand((UpdateMinimumActiveTxBeginTimeCommand) 
command, commandIndex, commandTerm,
+                            applied);
                 } else {
                     assert false : "Command was not found [cmd=" + command + 
']';
                 }
+
+                if (applied[0]) {

Review Comment:
   Well, IgniteBiTuple doesn't sound as a special class, why not to introduce 
result wrapper something like
   ```
   CommandProcessingResult
     Serializable result
     Boolean applied
   ```
   explaining in javadoc why the class is needed and what applied means?



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