You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/02/09 04:07:12 UTC

[GitHub] [pulsar] Jason918 commented on a change in pull request #14172: [Transaction] Optimize transaction timeout

Jason918 commented on a change in pull request #14172:
URL: https://github.com/apache/pulsar/pull/14172#discussion_r802252207



##########
File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/transaction/TransactionImpl.java
##########
@@ -164,6 +168,7 @@ public synchronized void registerCumulativeAckConsumer(ConsumerImpl<?> consumer)
         return checkIfOpenOrCommitting().thenCompose((value) -> {
             CompletableFuture<Void> commitFuture = new CompletableFuture<>();
             this.state = State.COMMITTING;
+            timeout.cancel();

Review comment:
       Why cancel timeout task here, not after state is in `COMMITTED, ABORTED, ERROR` which this transaction is actually completed.
   




-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org