You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "yaalsn (via GitHub)" <gi...@apache.org> on 2023/11/23 08:27:45 UTC
[PR] [improve][client] Ignore InterruptedException when pulsar-perf finishing [pulsar]
yaalsn opened a new pull request, #21613:
URL: https://github.com/apache/pulsar/pull/21613
### Motivation
If I run the command `bin/pulsar-perf produce my-topic -time 5`, it will return a `java.lang.InterruptedException` before exit.
<img width="1561" alt="image" src="https://github.com/apache/pulsar/assets/10069311/d889d2b8-79cd-4453-85d2-036cefda07f0">
The reason is that `doneLatch` will be zero before `sleep(5000)`, and the main thread will exit 0 when `doneLatch<=0`, so the `pulsar-perf-producer-exec` thread pool will be terminated and has a chance to throw an `InterruptedException` if it starts to run `sleep(5000)`.
https://github.com/apache/pulsar/blob/d1b7d0b7d86a7a8883407d3dc054bb8e21f96d60/pulsar-testclient/src/main/java/org/apache/pulsar/testclient/PerformanceProducer.java#L583-L584
https://github.com/apache/pulsar/blob/d1b7d0b7d86a7a8883407d3dc054bb8e21f96d60/pulsar-testclient/src/main/java/org/apache/pulsar/testclient/PerformanceProducer.java#L381-L390
https://github.com/apache/pulsar/blob/d1b7d0b7d86a7a8883407d3dc054bb8e21f96d60/pulsar-testclient/src/main/java/org/apache/pulsar/testclient/PerformanceProducer.java#L435-L436
### Verifying this change
- [x] Make sure that the change passes the CI checks.
### 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 -->
- [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
- [ ] `doc-complete` <!-- Docs have been already added -->
### Matching PR in forked repository
https://github.com/yaalsn/pulsar/pull/3
--
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
Re: [PR] [improve][client] Ignore InterruptedException when pulsar-perf finishing [pulsar]
Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun merged PR #21613:
URL: https://github.com/apache/pulsar/pull/21613
--
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
Re: [PR] [improve][client] Ignore InterruptedException when pulsar-perf finishing [pulsar]
Posted by "yaalsn (via GitHub)" <gi...@apache.org>.
yaalsn commented on PR #21613:
URL: https://github.com/apache/pulsar/pull/21613#issuecomment-1826097055
@RobertIndie Thanks for your investigation. Let's remove 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
Re: [PR] [improve][client] Ignore InterruptedException when pulsar-perf finishing [pulsar]
Posted by "yaalsn (via GitHub)" <gi...@apache.org>.
yaalsn commented on PR #21613:
URL: https://github.com/apache/pulsar/pull/21613#issuecomment-1824016721
@tisonkun I think so, but I don't know the reason for `sleep(5000)`, so I choose a safe way.
--
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
Re: [PR] [improve][client] Ignore InterruptedException when pulsar-perf finishing [pulsar]
Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on PR #21613:
URL: https://github.com/apache/pulsar/pull/21613#issuecomment-1826248338
Merging...
Thank you!
--
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
Re: [PR] [improve][client] Ignore InterruptedException when pulsar-perf finishing [pulsar]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #21613:
URL: https://github.com/apache/pulsar/pull/21613#issuecomment-1826247888
## [Codecov](https://app.codecov.io/gh/apache/pulsar/pull/21613?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
> Merging [#21613](https://app.codecov.io/gh/apache/pulsar/pull/21613?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (403e940) into [master](https://app.codecov.io/gh/apache/pulsar/commit/98bf9dd72910e1b02dea17148a4199e3b26d7147?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (98bf9dd) will **increase** coverage by `36.56%`.
> Report is 4 commits behind head on master.
> The diff coverage is `n/a`.
<details><summary>Additional details and impacted files</summary>
[![Impacted file tree graph](https://app.codecov.io/gh/apache/pulsar/pull/21613/graphs/tree.svg?width=650&height=150&src=pr&token=acYqCpsK9J&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)](https://app.codecov.io/gh/apache/pulsar/pull/21613?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #21613 +/- ##
=============================================
+ Coverage 36.75% 73.32% +36.56%
- Complexity 12215 32730 +20515
=============================================
Files 1715 1892 +177
Lines 131076 140688 +9612
Branches 14314 15493 +1179
=============================================
+ Hits 48182 103162 +54980
+ Misses 76498 29425 -47073
- Partials 6396 8101 +1705
```
| [Flag](https://app.codecov.io/gh/apache/pulsar/pull/21613/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [inttests](https://app.codecov.io/gh/apache/pulsar/pull/21613/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `24.09% <ø> (-0.09%)` | :arrow_down: |
| [systests](https://app.codecov.io/gh/apache/pulsar/pull/21613/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `24.69% <ø> (-0.22%)` | :arrow_down: |
| [unittests](https://app.codecov.io/gh/apache/pulsar/pull/21613/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `72.64% <ø> (+40.90%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
[see 1462 files with indirect coverage changes](https://app.codecov.io/gh/apache/pulsar/pull/21613/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
</details>
--
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