liangyepianzhou commented on a change in pull request #13348:
URL: https://github.com/apache/pulsar/pull/13348#discussion_r776928570
##########
File path:
pulsar-client/src/main/java/org/apache/pulsar/client/impl/transaction/TransactionImpl.java
##########
@@ -148,8 +152,32 @@ public synchronized void
registerSendOp(CompletableFuture<MessageId> sendFuture)
}
}
+ public synchronized <T> void registerInternal(CompletableFuture<T>
completableFuture) {
+ //There have been an exception, it means this transaction should not
be commit,
+ //so there is no need to record the execution of other operations
+ if (!executedFuture.isCompletedExceptionally()) {
+ opsExecutingInTxn.incrementAndGet();
+ executedFuture = new CompletableFuture<>();
Review comment:
* We cannot confirm that all operations have been completed, when
opsExecutingInTxn change to 0.
* It can only means the ops send before are completely, and maybe some ops
will come, then the opsExecutingInTxn to n from 0.
--
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]