sashapolo commented on code in PR #5258:
URL: https://github.com/apache/ignite-3/pull/5258#discussion_r1981509214
##########
modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/raft/ZonePartitionRaftListener.java:
##########
@@ -268,13 +272,24 @@ private IgniteBiTuple<Serializable, Boolean>
processCrossTableProcessorsCommand(
) {
IgniteBiTuple<Serializable, Boolean> result = new
IgniteBiTuple<>(null, false);
- tableProcessors.values().forEach(processor -> {
- IgniteBiTuple<Serializable, Boolean> r =
processor.processCommand(command, commandIndex, commandTerm, safeTimestamp);
- // Need to adjust the safe time if any of the table processors
successfully handled the command.
- if (Boolean.TRUE.equals(r.get2())) {
- result.set2(Boolean.TRUE);
+ if (tableProcessors.isEmpty()) {
+ synchronized (tableProcessorsStateLock) {
+ if (lastAppliedIndex < commandIndex) {
+ lastAppliedIndex = commandIndex;
Review Comment:
you don't need to update the index and the term here, it will be done
automatically by the enclosing method.
--
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]