Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE #4725] Optimize the CK/ACK 's invisibleTime in POP consumption mode. #4753

Merged
merged 13 commits into from Aug 8, 2022

Conversation

GenerousMan
Copy link
Contributor

Make sure set the target branch to develop

What is the purpose of the change

Replace scheduled message in POP with timer message.
In the current POP consumption mode, the InvisibleTime implementation of the CK/ACK message relies on the scheduled message. However, because of the precision limitation of the scheduled message, some CK/ACK messages may work not as expected. Since the completion of RIP-43, rocketmq can already support timing messages with arbitrary delay. Therefore, using this feature can optimize the POP consumption process.

Brief changelog

  1. Modify the function SetMessageDeliverTimer and getMessageDeliverTimer.
  2. Supplement the unit tests of PopReviveService, make sure the pipeline works well.

Verifying this change

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.

  • [√] Make sure there is a Github issue 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.
  • [√] 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.
  • [√] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • [√] 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.
  • [√] 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.

@duhenglucky duhenglucky added this to the 5.0.0 milestone Aug 1, 2022
@zhouxinyu zhouxinyu self-requested a review August 1, 2022 08:17
@zhouxinyu
Copy link
Member

@xdkxlk Please help review

@coveralls
Copy link

coveralls commented Aug 1, 2022

Coverage Status

Coverage increased (+0.08%) to 49.302% when pulling 80790e6 on GenerousMan:popTimer into 61b14c3 on apache:develop.

Copy link
Member

@zhouxinyu zhouxinyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@caigy caigy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zhouxinyu
Copy link
Member

@odbozhou You are pending on this PR, please help review and let's merge this PR ASAP.

@RongtongJin
Copy link
Contributor

@GenerousMan It seems that some UT failed

Results :
Tests in error:
PopReviveServiceTest.testRevive:157 » ConditionTimeout Condition with lambda e...
Tests run: 188, Failures: 0, Errors: 1, Skipped: 0

@codecov-commenter
Copy link

Codecov Report

Merging #4753 (80790e6) into develop (61b14c3) will decrease coverage by 0.14%.
The diff coverage is 53.84%.

@@              Coverage Diff              @@
##             develop    #4753      +/-   ##
=============================================
- Coverage      45.05%   44.90%   -0.15%     
+ Complexity      7629     7604      -25     
=============================================
  Files            978      977       -1     
  Lines          67953    67955       +2     
  Branches        8982     8982              
=============================================
- Hits           30614    30514     -100     
- Misses         33570    33651      +81     
- Partials        3769     3790      +21     
Impacted Files Coverage Δ
...a/org/apache/rocketmq/broker/BrokerController.java 43.89% <0.00%> (-2.74%) ⬇️
...cketmq/broker/processor/PopBufferMergeService.java 40.71% <0.00%> (ø)
...va/org/apache/rocketmq/common/message/Message.java 52.32% <0.00%> (-0.62%) ⬇️
...he/rocketmq/broker/processor/PopReviveService.java 38.35% <75.00%> (+13.44%) ⬆️
...rocketmq/broker/processor/AckMessageProcessor.java 45.04% <100.00%> (ø)
...broker/processor/ChangeInvisibleTimeProcessor.java 65.13% <100.00%> (ø)
...rocketmq/broker/processor/PopMessageProcessor.java 38.73% <100.00%> (ø)
...apache/rocketmq/broker/longpolling/PopRequest.java 31.03% <0.00%> (-13.80%) ⬇️
...org/apache/rocketmq/common/stats/StatsItemSet.java 41.79% <0.00%> (-10.45%) ⬇️
...q/namesrv/routeinfo/BrokerHousekeepingService.java 72.72% <0.00%> (-9.10%) ⬇️
... and 28 more

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@RongtongJin RongtongJin merged commit 705e717 into apache:develop Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants