void-ptr974 commented on code in PR #25887:
URL: https://github.com/apache/pulsar/pull/25887#discussion_r3329813075


##########
pulsar-testclient/src/main/java/org/apache/pulsar/testclient/PerformanceProducer.java:
##########
@@ -693,11 +702,9 @@ private void runProducer(int producerId,
                     if (this.isEnableTransaction
                             && numMessageSend.incrementAndGet() == 
this.numMessagesPerTransaction) {
                         if (!this.isAbortTransaction) {
-                            transaction.commit()
+                            transaction.async().commit()

Review Comment:
   messageBuilder.send() is asynchronous, but this commits based only on the 
local send counter. In V5 the actual send is dispatched through the producer 
dispatch chain, so commit can race before all sends are registered in the 
transaction. Please collect the per-transaction send futures and wait for them 
before committing, like PerformanceTransaction does.



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