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



##########
File path: 
pulsar-client/src/main/java/org/apache/pulsar/client/impl/transaction/TransactionImpl.java
##########
@@ -269,11 +250,18 @@ public TxnID getTxnID() {
                 + state.name() + ", expect " + State.OPEN + " state!"));
     }
 
+    public synchronized void registerSendOp(CompletableFuture<MessageId> 
newSendFuture) {
+        sendFuture = sendFuture.thenCompose(ignore -> newSendFuture);
+    }
+
+    public synchronized void registerAckOp(CompletableFuture<Void> 
newAckFuture) {
+        ackFuture = ackFuture.thenCompose(ignore -> newAckFuture);
+    }
 
-    private CompletableFuture<Void> allOpComplete() {
+    public CompletableFuture<Void> prepareCommit() {

Review comment:
       This is really an important point, thanks a lot for the reminder. I have 
made optimizations, what do you think about this change? 




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