denis-chudov commented on code in PR #4049:
URL: https://github.com/apache/ignite-3/pull/4049#discussion_r1728837363
##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/replicator/PartitionReplicaListener.java:
##########
@@ -2770,37 +2748,33 @@ private CompletableFuture<CompletableFuture<?>>
applyUpdateCommand(
applyCmdWithExceptionHandling(cmd, resultFuture);
- return resultFuture.thenApply(res -> {
+ return resultFuture.thenCompose(res -> {
UpdateCommandResult updateCommandResult =
(UpdateCommandResult) res;
if (full && updateCommandResult != null &&
!updateCommandResult.isPrimaryReplicaMatch()) {
Review Comment:
> Why?
Because there is `if (!cmd.full()) ` condition above and this line is in
`else` block of it.
And you removed it from `applyUpdateAllCommand`:
https://github.com/apache/ignite-3/pull/4049/files#diff-ffd8e6bdd8ddf91dfee6d674bd0a8f54c5fa0ca0e95c409b962af4443aad30aeL2923
##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/replicator/PartitionReplicaListener.java:
##########
@@ -2770,37 +2748,33 @@ private CompletableFuture<CompletableFuture<?>>
applyUpdateCommand(
applyCmdWithExceptionHandling(cmd, resultFuture);
- return resultFuture.thenApply(res -> {
+ return resultFuture.thenCompose(res -> {
UpdateCommandResult updateCommandResult =
(UpdateCommandResult) res;
if (full && updateCommandResult != null &&
!updateCommandResult.isPrimaryReplicaMatch()) {
Review Comment:
> Why?
Because there is `if (!cmd.full()) ` condition above and this line is in
`else` block of it.
And you removed it from `applyUpdateAllCommand`:
https://github.com/apache/ignite-3/pull/4049/files#diff-ffd8e6bdd8ddf91dfee6d674bd0a8f54c5fa0ca0e95c409b962af4443aad30aeL2923
--
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]