denis-chudov commented on code in PR #4821:
URL: https://github.com/apache/ignite-3/pull/4821#discussion_r1895857123
##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/replicator/PartitionReplicaListener.java:
##########
@@ -1956,15 +1935,13 @@ private
CompletableFuture<WriteIntentSwitchReplicatedInfo> applyWriteIntentSwitc
indexIdsAtRwTxBeginTs(transactionId)
);
- CompletableFuture<Object> resultFuture = new CompletableFuture<>();
-
- applyCmdWithRetryOnSafeTimeReorderException(wiSwitchCmd, resultFuture);
-
- return resultFuture
+ return applyCmdWithExceptionHandling(wiSwitchCmd)
.exceptionally(e -> {
LOG.warn("Failed to complete transaction cleanup command
[txId=" + transactionId + ']', e);
- return nullCompletedFuture();
+ ExceptionUtils.sneakyThrow(e);
Review Comment:
It seems that this code is a result of accumulated error due to multiple
changes. At some moment, we did async write intent switch and didn't care about
the result of the future: that's why `exceptionally` with logging was made.
After that, it was moved to the return sentence. It's about time to fix it
(which @ascherbakoff just did): the exception should be propagated in order to
make a retry in `WriteIntentSwitchProcessor#switchWriteIntentsWithRetry`
--
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]