AnonHxy commented on code in PR #19775:
URL: https://github.com/apache/pulsar/pull/19775#discussion_r1134991644
##########
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:
OK, I missed the inner-for loop
##########
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:
Could `client.close` throw other exceptions , which will cause this block
not be executed
--
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]