AnonHxy commented on code in PR #19775:
URL: https://github.com/apache/pulsar/pull/19775#discussion_r1134898824


##########
pulsar-testclient/src/main/java/org/apache/pulsar/testclient/PerformanceProducer.java:
##########
@@ -604,14 +606,18 @@ private static void runProducer(int producerId,
             AtomicLong numMessageSend = new AtomicLong(0);
             Semaphore numMsgPerTxnLimit = new 
Semaphore(arguments.numMessagesPerTransaction);
             while (true) {
+                if (produceEnough) {

Review Comment:
   Can `produceEnough` be true here?



##########
pulsar-testclient/src/main/java/org/apache/pulsar/testclient/PerformanceProducer.java:
##########
@@ -753,11 +760,13 @@ private static void runProducer(int producerId,
             if (null != client) {
                 try {
                     client.close();
-                    PerfClientUtils.exit(1);
                 } catch (PulsarClientException e) {
                     log.error("Failed to close test client", e);
                 }
             }
+            if (!produceEnough) {

Review Comment:
   How about move this block to line before `if (null != client)`?  Or catch 
`Throwable` when client close.



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