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/03/28 02:59:27 UTC

[GitHub] [rocketmq] Git-Yang opened a new pull request #4045: [ISSUE #4033] fix async deliver msg will resend forever when serivce not avliable

Git-Yang opened a new pull request #4045:
URL: https://github.com/apache/rocketmq/pull/4045


   **Make sure set the target branch to `develop`**
   
   ## What is the purpose of the change
   
   fix #4033 
   
   ## Brief changelog
   
   XX
   
   ## 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] ni-ze commented on a change in pull request #4045: [ISSUE #4033] fix async deliver msg will resend forever when serivce not avliable

Posted by GitBox <gi...@apache.org>.
ni-ze commented on a change in pull request #4045:
URL: https://github.com/apache/rocketmq/pull/4045#discussion_r838080681



##########
File path: store/src/main/java/org/apache/rocketmq/store/schedule/ScheduleMessageService.java
##########
@@ -555,7 +555,7 @@ public void run() {
                                 return;
                             }
                             log.warn("putResultProcess error, info={}", putResultProcess.toString());
-                            putResultProcess.onException();
+                            putResultProcess.doResend();

Review comment:
       if a exception occur in doResend which will also cause infinite resend, there is not chance to reach SKIP status.




-- 
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] HScarb commented on pull request #4045: [ISSUE #4033] fix async deliver msg will resend forever when serivce not avliable

Posted by GitBox <gi...@apache.org>.
HScarb commented on pull request #4045:
URL: https://github.com/apache/rocketmq/pull/4045#issuecomment-1080359065


   After testing, the problem does not occur again.


-- 
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] ni-ze commented on pull request #4045: [ISSUE #4033] fix async deliver msg will resend forever when serivce not avliable

Posted by GitBox <gi...@apache.org>.
ni-ze commented on pull request #4045:
URL: https://github.com/apache/rocketmq/pull/4045#issuecomment-1083992728


   A further question, when master switch to salve, deliverExecutorService and handleExecutorService should shutdown immediately, expired message should not put into commitLog, which should be execute on the new master.


-- 
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 #4045: [ISSUE #4033] fix async deliver msg will resend forever when serivce not avliable

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






-- 
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] Git-Yang commented on pull request #4045: [ISSUE #4033] fix async deliver msg will resend forever when serivce not avliable

Posted by GitBox <gi...@apache.org>.
Git-Yang commented on pull request #4045:
URL: https://github.com/apache/rocketmq/pull/4045#issuecomment-1083997502


   > A further discuss, when master switch to salve, deliverExecutorService and handleExecutorService should shutdown immediately, expired message should not put into commitLog, which should be execute on the new master.
   
   That's 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: dev-unsubscribe@rocketmq.apache.org

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



[GitHub] [rocketmq] Git-Yang commented on pull request #4045: [ISSUE #4033] fix async deliver msg will resend forever when serivce not avliable

Posted by GitBox <gi...@apache.org>.
Git-Yang commented on pull request #4045:
URL: https://github.com/apache/rocketmq/pull/4045#issuecomment-1080292092


   @dongeforever I fixed it by this way, can you help me to check?


-- 
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] Git-Yang commented on pull request #4045: [ISSUE #4033] fix async deliver msg will resend forever when serivce not avliable

Posted by GitBox <gi...@apache.org>.
Git-Yang commented on pull request #4045:
URL: https://github.com/apache/rocketmq/pull/4045#issuecomment-1082552559


   @RongtongJin Please help to check, thanks!


-- 
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] Git-Yang commented on pull request #4045: [ISSUE #4033] fix async deliver msg will resend forever when serivce not avliable

Posted by GitBox <gi...@apache.org>.
Git-Yang commented on pull request #4045:
URL: https://github.com/apache/rocketmq/pull/4045#issuecomment-1084001022


   > A further discuss, when master switch to salve, deliverExecutorService and handleExecutorService should shutdown immediately, expired message should not put into commitLog, which should be execute on the new master.
   
   - If the node has become a slave, message writing will fail and the thread pool will end immediately.
   - Messages that have been delivered successfully should commit offset as much as possible before closing.


-- 
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] ni-ze edited a comment on pull request #4045: [ISSUE #4033] fix async deliver msg will resend forever when serivce not avliable

Posted by GitBox <gi...@apache.org>.
ni-ze edited a comment on pull request #4045:
URL: https://github.com/apache/rocketmq/pull/4045#issuecomment-1083992728


   A further discuss, when master switch to salve, deliverExecutorService and handleExecutorService should shutdown immediately, expired message should not put into commitLog, which should be execute on the new master.


-- 
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] Git-Yang commented on pull request #4045: [ISSUE #4033] fix async deliver msg will resend forever when serivce not avliable

Posted by GitBox <gi...@apache.org>.
Git-Yang commented on pull request #4045:
URL: https://github.com/apache/rocketmq/pull/4045#issuecomment-1080130169


   @HScarb I think it might be more appropriate to fix it like this, can you help me with a review?


-- 
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] codecov-commenter commented on pull request #4045: [ISSUE #4033] fix async deliver msg will resend forever when serivce not avliable

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


   # [Codecov](https://codecov.io/gh/apache/rocketmq/pull/4045?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 [#4045](https://codecov.io/gh/apache/rocketmq/pull/4045?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (19b9670) into [develop](https://codecov.io/gh/apache/rocketmq/commit/c121565c3eb59d536edc54512624e420136d30e5?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c121565) will **decrease** coverage by `0.00%`.
   > The diff coverage is `66.66%`.
   
   ```diff
   @@              Coverage Diff              @@
   ##             develop    #4045      +/-   ##
   =============================================
   - Coverage      47.92%   47.91%   -0.01%     
     Complexity      5001     5001              
   =============================================
     Files            633      633              
     Lines          42528    42528              
     Branches        5573     5573              
   =============================================
   - Hits           20381    20379       -2     
   + Misses         19658    19653       -5     
   - Partials        2489     2496       +7     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/rocketmq/pull/4045?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...ocketmq/store/schedule/ScheduleMessageService.java](https://codecov.io/gh/apache/rocketmq/pull/4045/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-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL3NjaGVkdWxlL1NjaGVkdWxlTWVzc2FnZVNlcnZpY2UuamF2YQ==) | `67.75% <66.66%> (+0.75%)` | :arrow_up: |
   | [...va/org/apache/rocketmq/store/FlushDiskWatcher.java](https://codecov.io/gh/apache/rocketmq/pull/4045/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-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL0ZsdXNoRGlza1dhdGNoZXIuamF2YQ==) | `81.25% <0.00%> (-9.38%)` | :arrow_down: |
   | [...in/java/org/apache/rocketmq/test/util/MQAdmin.java](https://codecov.io/gh/apache/rocketmq/pull/4045/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-dGVzdC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcm9ja2V0bXEvdGVzdC91dGlsL01RQWRtaW4uamF2YQ==) | `38.88% <0.00%> (-5.56%)` | :arrow_down: |
   | [...ache/rocketmq/common/stats/MomentStatsItemSet.java](https://codecov.io/gh/apache/rocketmq/pull/4045/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-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jb21tb24vc3RhdHMvTW9tZW50U3RhdHNJdGVtU2V0LmphdmE=) | `39.13% <0.00%> (-4.35%)` | :arrow_down: |
   | [...ava/org/apache/rocketmq/test/util/VerifyUtils.java](https://codecov.io/gh/apache/rocketmq/pull/4045/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-dGVzdC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcm9ja2V0bXEvdGVzdC91dGlsL1ZlcmlmeVV0aWxzLmphdmE=) | `46.26% <0.00%> (-2.99%)` | :arrow_down: |
   | [...a/org/apache/rocketmq/filter/util/BloomFilter.java](https://codecov.io/gh/apache/rocketmq/pull/4045/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-ZmlsdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9maWx0ZXIvdXRpbC9CbG9vbUZpbHRlci5qYXZh) | `60.43% <0.00%> (-2.20%)` | :arrow_down: |
   | [...he/rocketmq/client/impl/consumer/ProcessQueue.java](https://codecov.io/gh/apache/rocketmq/pull/4045/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-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvaW1wbC9jb25zdW1lci9Qcm9jZXNzUXVldWUuamF2YQ==) | `61.46% <0.00%> (-0.46%)` | :arrow_down: |
   | [...a/org/apache/rocketmq/store/StoreStatsService.java](https://codecov.io/gh/apache/rocketmq/pull/4045/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-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL1N0b3JlU3RhdHNTZXJ2aWNlLmphdmE=) | `36.97% <0.00%> (ø)` | |
   | [.../apache/rocketmq/logging/inner/LoggingBuilder.java](https://codecov.io/gh/apache/rocketmq/pull/4045/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-bG9nZ2luZy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcm9ja2V0bXEvbG9nZ2luZy9pbm5lci9Mb2dnaW5nQnVpbGRlci5qYXZh) | `64.87% <0.00%> (+0.47%)` | :arrow_up: |
   | ... and [4 more](https://codecov.io/gh/apache/rocketmq/pull/4045/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/4045?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/4045?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 [c121565...19b9670](https://codecov.io/gh/apache/rocketmq/pull/4045?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] Git-Yang commented on a change in pull request #4045: [ISSUE #4033] fix async deliver msg will resend forever when serivce not avliable

Posted by GitBox <gi...@apache.org>.
Git-Yang commented on a change in pull request #4045:
URL: https://github.com/apache/rocketmq/pull/4045#discussion_r838161975



##########
File path: store/src/main/java/org/apache/rocketmq/store/schedule/ScheduleMessageService.java
##########
@@ -555,7 +555,7 @@ public void run() {
                                 return;
                             }
                             log.warn("putResultProcess error, info={}", putResultProcess.toString());
-                            putResultProcess.onException();
+                            putResultProcess.doResend();

Review comment:
       It is necessary to retry if an exception occurs, otherwise it will cause data loss.




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