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



##########
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:
       The function of timeout is to set the status of the transaction to 
timeout when the transaction times out.
   If the state of the transaction has become committing or aborting, the 
timeout will have no effect. At this point, the resources of this timetask can 
be released




-- 
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]


Reply via email to