sanpwc commented on code in PR #4821: URL: https://github.com/apache/ignite-3/pull/4821#discussion_r1899328977
########## 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: `IgniteBiTuple<Serializable, Boolean> result = null;` It's quit difficult to understand what that means. At least it deserves a comment. -- 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