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



##########
File path: 
pulsar-testclient/src/main/java/org/apache/pulsar/testclient/PerformanceProducer.java
##########
@@ -597,7 +634,11 @@ private static void runProducer(int producerId,
             }
             // Send messages on all topics/producers
             long totalSent = 0;
+            AtomicReference<Transaction> transactionAtomicReference = 
buildTransaction(client, arguments);
+            AtomicLong numMessageSend = new AtomicLong(0);
+            Semaphore semaphore = new 
Semaphore(arguments.numMessagesPerTransaction);
             while (true) {
+                Transaction transaction = transactionAtomicReference.get();

Review comment:
       If transaction is disable, there transaction will be null without 
exception.  In terms of results, it is no different from adding a judgment. I 
didn’t add that judgment in order to simplify




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