vldpyatkov commented on code in PR #5146:
URL: https://github.com/apache/ignite-3/pull/5146#discussion_r1937596298
##########
modules/transactions/src/main/java/org/apache/ignite/internal/tx/impl/ReadWriteTransactionImpl.java:
##########
@@ -159,18 +162,54 @@ public CompletableFuture<Void> finish(boolean commit,
@Nullable HybridTimestamp
return finishFuture;
}
+ return finishInternal(commit, executionTimestamp, full, true);
+ }
+
+ private CompletableFuture<Void> finishInternal(
+ boolean commit,
+ @Nullable HybridTimestamp executionTimestamp,
+ boolean full,
+ boolean isComplete
+ ) {
enlistPartitionLock.writeLock().lock();
try {
if (finishFuture == null) {
+ if (killed) {
+ if (isComplete) {
+ finishFuture = nullCompletedFuture();
+
+ return failedFuture(new TransactionException(
Review Comment:
Because `finishFuture` is set as `nullCompletedFuture()`.
This matches with the general logic: an exception is thrown only in the
first complete operation call (commit or rollback), the other calls after would
be completed silently.
--
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]