You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "thetumbled (via GitHub)" <gi...@apache.org> on 2023/03/10 02:37:53 UTC

[GitHub] [pulsar] thetumbled opened a new pull request, #19775: [Bug] [Perf] PerformanceProducer do not produce expected number of messages.

thetumbled opened a new pull request, #19775:
URL: https://github.com/apache/pulsar/pull/19775

   
   <!-- Either this PR fixes an issue, -->
   
   Fixes #19774 
   
   
   ### Motivation
   
   
   ### Modifications
   remove `system.exit()`.
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   *(Please pick either of the following options)*
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   *(or)*
   
   This change is already covered by existing tests, such as *(please describe tests)*.
   
   *(or)*
   
   This change added tests and can be verified as follows:
   
   *(example:)*
     - *Added integration tests for end-to-end deployment with large payloads (10MB)*
     - *Extended integration test for recovery after broker failure*
   
   ### Does this pull request potentially affect one of the following parts:
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   *If the box was checked, please highlight the changes*
   
   - [ ] Dependencies (add or upgrade a dependency)
   - [ ] The public API
   - [ ] The schema
   - [ ] The default values of configurations
   - [ ] The threading model
   - [ ] The binary protocol
   - [ ] The REST endpoints
   - [ ] The admin CLI options
   - [ ] The metrics
   - [ ] Anything that affects deployment
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc` <!-- Your PR contains doc changes. -->
   - [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
   - [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->
   
   ### Matching PR in forked repository
   
   PR in forked repository: <!-- ENTER URL HERE -->
   
   


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] michaeljmarshall commented on pull request #19775: [fix] [Perf] PerformanceProducer do not produce expected number of messages.

Posted by "michaeljmarshall (via GitHub)" <gi...@apache.org>.
michaeljmarshall commented on PR #19775:
URL: https://github.com/apache/pulsar/pull/19775#issuecomment-1610271811

   As discussed on the mailing list https://lists.apache.org/thread/w4jzk27qhtosgsz7l9bmhf1t7o9mxjhp, there is no plan to release 2.9.6, so I am going to remove the release/2.9.6 label


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] AnonHxy commented on a diff in pull request #19775: [Bug] [Perf] PerformanceProducer do not produce expected number of messages.

Posted by "AnonHxy (via GitHub)" <gi...@apache.org>.
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] thetumbled commented on a diff in pull request #19775: [Bug] [Perf] PerformanceProducer do not produce expected number of messages.

Posted by "thetumbled (via GitHub)" <gi...@apache.org>.
thetumbled commented on code in PR #19775:
URL: https://github.com/apache/pulsar/pull/19775#discussion_r1134911143


##########
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:
   If we produce enough messages or produce for enough time, `produceEnough` will be set to `true`.



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] thetumbled commented on a diff in pull request #19775: [Bug] [Perf] PerformanceProducer do not produce expected number of messages.

Posted by "thetumbled (via GitHub)" <gi...@apache.org>.
thetumbled commented on code in PR #19775:
URL: https://github.com/apache/pulsar/pull/19775#discussion_r1134917217


##########
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:
   why do we move this block to line before if (null != client)? 



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] AnonHxy commented on a diff in pull request #19775: [Bug] [Perf] PerformanceProducer do not produce expected number of messages.

Posted by "AnonHxy (via GitHub)" <gi...@apache.org>.
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] github-actions[bot] commented on pull request #19775: [fix] [Perf] PerformanceProducer do not produce expected number of messages.

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #19775:
URL: https://github.com/apache/pulsar/pull/19775#issuecomment-1544990565

   The pr had no activity for 30 days, mark with Stale label.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] thetumbled commented on a diff in pull request #19775: [Bug] [Perf] PerformanceProducer do not produce expected number of messages.

Posted by "thetumbled (via GitHub)" <gi...@apache.org>.
thetumbled commented on code in PR #19775:
URL: https://github.com/apache/pulsar/pull/19775#discussion_r1135018169


##########
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:
   you are right, i have fixed it.



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] tisonkun merged pull request #19775: [fix] [Perf] PerformanceProducer do not produce expected number of messages.

Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun merged PR #19775:
URL: https://github.com/apache/pulsar/pull/19775


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org