You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/07/13 09:33:43 UTC

[GitHub] [rocketmq] liuzongliang0202 opened a new pull request, #4603: [ISSUE #4587] rocketmq thread pool add a "bottom-up" scheme to catch exceptions

liuzongliang0202 opened a new pull request, #4603:
URL: https://github.com/apache/rocketmq/pull/4603

   **Make sure set the target branch to `develop`**
   
   ## What is the purpose of the change
   
   rocketmq thread pool add a "bottom-up" scheme to catch exceptions. Use the uncaught exception handler that comes with the thread
   
   ## Brief changelog
   
   Refer https://github.com/apache/rocketmq/issues/4587
   
   ## Verifying this change
   
   XXXX
   
   Follow this checklist to help us incorporate your contribution quickly and easily. Notice, `it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR`.
   
   - [x] Make sure there is a [Github issue](https://github.com/apache/rocketmq/issues) filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue. 
   - [x] Format the pull request title like `[ISSUE #123] Fix UnknownException when host config not exist`. Each commit in the pull request should have a meaningful subject line and body.
   - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
   - [x] Write necessary unit-test(over 80% coverage) to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in [test module](https://github.com/apache/rocketmq/tree/master/test).
   - [x] Run `mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle` to make sure basic checks pass. Run `mvn clean install -DskipITs` to make sure unit-test pass. Run `mvn clean test-compile failsafe:integration-test`  to make sure integration-test pass.
   - [ ] If this contribution is large, please file an [Apache Individual Contributor License Agreement](http://www.apache.org/licenses/#clas).
   


-- 
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: dev-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] coveralls commented on pull request #4603: [ISSUE #4587] rocketmq thread pool add a "bottom-up" scheme to catch exceptions

Posted by GitBox <gi...@apache.org>.
coveralls commented on PR #4603:
URL: https://github.com/apache/rocketmq/pull/4603#issuecomment-1183234183

   
   [![Coverage Status](https://coveralls.io/builds/50830256/badge)](https://coveralls.io/builds/50830256)
   
   Coverage decreased (-0.05%) to 47.582% when pulling **2d25e6df537e909b6017560480cd96c823f32a7b on liuzongliang0202:feature-enhance_threadpool** into **10326b479af2282310ea0f496f6c08229e4ae126 on apache:develop**.
   


-- 
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: dev-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] liuzongliang0202 commented on a diff in pull request #4603: [ISSUE #4587] rocketmq thread pool add a "bottom-up" scheme to catch exceptions

Posted by GitBox <gi...@apache.org>.
liuzongliang0202 commented on code in PR #4603:
URL: https://github.com/apache/rocketmq/pull/4603#discussion_r920705281


##########
common/src/main/java/org/apache/rocketmq/common/ThreadFactoryImpl.java:
##########
@@ -38,6 +43,12 @@ public ThreadFactoryImpl(final String threadNamePrefix, boolean daemon) {
     public Thread newThread(Runnable r) {
         Thread thread = new Thread(r, threadNamePrefix + this.threadIndex.incrementAndGet());
         thread.setDaemon(daemon);
+        thread.setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {

Review Comment:
   OK, I have changed to use lambda



-- 
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: dev-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] hzh0425 commented on a diff in pull request #4603: [ISSUE #4587] rocketmq thread pool add a "bottom-up" scheme to catch exceptions

Posted by GitBox <gi...@apache.org>.
hzh0425 commented on code in PR #4603:
URL: https://github.com/apache/rocketmq/pull/4603#discussion_r920701672


##########
common/src/main/java/org/apache/rocketmq/common/ThreadFactoryImpl.java:
##########
@@ -38,6 +43,12 @@ public ThreadFactoryImpl(final String threadNamePrefix, boolean daemon) {
     public Thread newThread(Runnable r) {
         Thread thread = new Thread(r, threadNamePrefix + this.threadIndex.incrementAndGet());
         thread.setDaemon(daemon);
+        thread.setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {

Review Comment:
   It's better to use lambda



-- 
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: dev-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] github-actions[bot] commented on pull request #4603: [ISSUE #4587] rocketmq thread pool add a "bottom-up" scheme to catch exceptions

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

   This PR was closed because it has been inactive for 3 days since being marked as stale.


-- 
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@rocketmq.apache.org

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


[GitHub] [rocketmq] github-actions[bot] commented on pull request #4603: [ISSUE #4587] rocketmq thread pool add a "bottom-up" scheme to catch exceptions

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

   This PR is stale because it has been open for 365 days with no activity. It will be closed in 3 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this PR.


-- 
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@rocketmq.apache.org

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


[GitHub] [rocketmq] codecov-commenter commented on pull request #4603: [ISSUE #4587] rocketmq thread pool add a "bottom-up" scheme to catch exceptions

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #4603:
URL: https://github.com/apache/rocketmq/pull/4603#issuecomment-1183950165

   # [Codecov](https://codecov.io/gh/apache/rocketmq/pull/4603?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#4603](https://codecov.io/gh/apache/rocketmq/pull/4603?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f47cc70) into [develop](https://codecov.io/gh/apache/rocketmq/commit/493e52b945c7fdbdddb759847816d4952c966cff?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (493e52b) will **decrease** coverage by `4.66%`.
   > The diff coverage is `50.00%`.
   
   ```diff
   @@              Coverage Diff              @@
   ##             develop    #4603      +/-   ##
   =============================================
   - Coverage      48.17%   43.51%   -4.67%     
   - Complexity      5129     6218    +1089     
   =============================================
     Files            649      817     +168     
     Lines          43045    57656   +14611     
     Branches        5630     7873    +2243     
   =============================================
   + Hits           20737    25089    +4352     
   - Misses         19801    29320    +9519     
   - Partials        2507     3247     +740     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/rocketmq/pull/4603?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [.../org/apache/rocketmq/common/ThreadFactoryImpl.java](https://codecov.io/gh/apache/rocketmq/pull/4603/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jb21tb24vVGhyZWFkRmFjdG9yeUltcGwuamF2YQ==) | `60.00% <50.00%> (-40.00%)` | :arrow_down: |
   | [...main/java/org/apache/rocketmq/store/StoreUtil.java](https://codecov.io/gh/apache/rocketmq/pull/4603/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL1N0b3JlVXRpbC5qYXZh) | `21.42% <0.00%> (-50.00%)` | :arrow_down: |
   | [...s/command/consumer/ConsumerProgressSubCommand.java](https://codecov.io/gh/apache/rocketmq/pull/4603/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-dG9vbHMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3Rvb2xzL2NvbW1hbmQvY29uc3VtZXIvQ29uc3VtZXJQcm9ncmVzc1N1YkNvbW1hbmQuamF2YQ==) | `0.00% <0.00%> (-28.86%)` | :arrow_down: |
   | [...va/org/apache/rocketmq/store/PutMessageResult.java](https://codecov.io/gh/apache/rocketmq/pull/4603/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL1B1dE1lc3NhZ2VSZXN1bHQuamF2YQ==) | `39.13% <0.00%> (-27.54%)` | :arrow_down: |
   | [...che/rocketmq/common/protocol/body/ClusterInfo.java](https://codecov.io/gh/apache/rocketmq/pull/4603/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jb21tb24vcHJvdG9jb2wvYm9keS9DbHVzdGVySW5mby5qYXZh) | `62.50% <0.00%> (-25.74%)` | :arrow_down: |
   | [...org/apache/rocketmq/broker/out/BrokerOuterAPI.java](https://codecov.io/gh/apache/rocketmq/pull/4603/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvb3V0L0Jyb2tlck91dGVyQVBJLmphdmE=) | `21.56% <0.00%> (-24.91%)` | :arrow_down: |
   | [...pache/rocketmq/store/stats/BrokerStatsManager.java](https://codecov.io/gh/apache/rocketmq/pull/4603/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL3N0YXRzL0Jyb2tlclN0YXRzTWFuYWdlci5qYXZh) | `47.83% <0.00%> (-24.04%)` | :arrow_down: |
   | [...ketmq/client/impl/consumer/PullMessageService.java](https://codecov.io/gh/apache/rocketmq/pull/4603/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvaW1wbC9jb25zdW1lci9QdWxsTWVzc2FnZVNlcnZpY2UuamF2YQ==) | `49.23% <0.00%> (-21.89%)` | :arrow_down: |
   | [...apache/rocketmq/common/message/MessageDecoder.java](https://codecov.io/gh/apache/rocketmq/pull/4603/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jb21tb24vbWVzc2FnZS9NZXNzYWdlRGVjb2Rlci5qYXZh) | `61.04% <0.00%> (-19.84%)` | :arrow_down: |
   | ... and [380 more](https://codecov.io/gh/apache/rocketmq/pull/4603/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/rocketmq/pull/4603?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/rocketmq/pull/4603?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [493e52b...f47cc70](https://codecov.io/gh/apache/rocketmq/pull/4603?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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: dev-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] github-actions[bot] closed pull request #4603: [ISSUE #4587] rocketmq thread pool add a "bottom-up" scheme to catch exceptions

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #4603: [ISSUE #4587] rocketmq thread pool add a "bottom-up" scheme to catch exceptions
URL: https://github.com/apache/rocketmq/pull/4603


-- 
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@rocketmq.apache.org

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