codelipenghui commented on code in PR #17777:
URL: https://github.com/apache/pulsar/pull/17777#discussion_r983069566
##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/transaction/TransactionImpl.java:
##########
@@ -123,8 +130,16 @@ public CompletableFuture<Void>
registerProducedTopic(String topic) {
return completableFuture;
}
- public synchronized void registerSendOp(CompletableFuture<MessageId>
sendFuture) {
- sendFutureList.add(sendFuture);
+ public void registerSendOp(CompletableFuture<MessageId> newSendFuture) {
+ if (sendCount.getAndIncrement() == 0) {
+ sendFuture = new CompletableFuture<>();
+ }
Review Comment:
@liangyepianzhou Ignore this one.
It related here
https://github.com/apache/pulsar/pull/17777#discussion_r981114108
I see the constructor already set sendFuture and ackFuture to `new
CompletableFuture<>()`
--
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]