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 #3286] replace Timer with ScheduledExecutorService #3287

Merged
merged 1 commit into from Nov 10, 2021

Conversation

Git-Yang
Copy link
Member

@Git-Yang Git-Yang commented Aug 24, 2021

What is the purpose of the change

#3286

Brief changelog

  • By replacing Timer with ScheduledExecutorService, all queue threads can send messages concurrently.

Verifying this change

  • Messages of 18 delay levels are delivered at the same time, and the delivery of TPS is about 1w, which is in line with expectations
    image

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.

@coveralls
Copy link

coveralls commented Aug 24, 2021

Coverage Status

Coverage decreased (-0.03%) to 54.497% when pulling acc3f34 on Git-Yang:develop_schedule into 2385f04 on apache:develop.

@codecov-commenter
Copy link

codecov-commenter commented Aug 24, 2021

Codecov Report

Merging #3287 (acc3f34) into develop (2385f04) will decrease coverage by 0.06%.
The diff coverage is 75.00%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #3287      +/-   ##
=============================================
- Coverage      48.32%   48.25%   -0.07%     
+ Complexity      4609     4604       -5     
=============================================
  Files            555      555              
  Lines          36731    36731              
  Branches        4839     4838       -1     
=============================================
- Hits           17750    17725      -25     
- Misses         16751    16778      +27     
+ Partials        2230     2228       -2     
Impacted Files Coverage Δ
...ocketmq/store/schedule/ScheduleMessageService.java 73.83% <75.00%> (ø)
...apache/rocketmq/remoting/netty/ResponseFuture.java 85.00% <0.00%> (-5.00%) ⬇️
...rocketmq/remoting/netty/NettyRemotingAbstract.java 47.05% <0.00%> (-4.05%) ⬇️
...org/apache/rocketmq/common/stats/StatsItemSet.java 49.25% <0.00%> (-1.50%) ⬇️
...mq/client/impl/consumer/RebalanceLitePullImpl.java 48.52% <0.00%> (-1.48%) ⬇️
...he/rocketmq/client/trace/AsyncTraceDispatcher.java 77.22% <0.00%> (-1.00%) ⬇️
...e/rocketmq/client/impl/consumer/RebalanceImpl.java 39.45% <0.00%> (-0.79%) ⬇️
...ent/impl/consumer/DefaultLitePullConsumerImpl.java 69.03% <0.00%> (-0.52%) ⬇️
...he/rocketmq/client/impl/consumer/ProcessQueue.java 58.60% <0.00%> (-0.47%) ⬇️
.../apache/rocketmq/logging/inner/LoggingBuilder.java 63.60% <0.00%> (-0.32%) ⬇️
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2385f04...acc3f34. Read the comment docs.

@Git-Yang Git-Yang changed the title [ISSUE #3286] By replacing Timer with ScheduledExecutorService [ISSUE #3286] replace Timer with ScheduledExecutorService Aug 27, 2021
Signed-off-by: zhangyang21 <zhangyang21@xiaomi.com>
@Git-Yang
Copy link
Member Author

Git-Yang commented Nov 9, 2021

I hope to fix ISSUE #3473 based on this version to avoid merge conflicts. Please review this pr for me, thanks! @ShannonDing

@odbozhou odbozhou merged commit b35f3e4 into apache:develop Nov 10, 2021
zhongxiongzeng pushed a commit to zhongxiongzeng/rocketmq that referenced this pull request Jan 17, 2022
…he#3287)

Signed-off-by: zhangyang21 <zhangyang21@xiaomi.com>
devfat pushed a commit to devfat/rocketmq that referenced this pull request Mar 3, 2022
…he#3287)

Signed-off-by: zhangyang21 <zhangyang21@xiaomi.com>
GenerousMan pushed a commit to GenerousMan/rocketmq that referenced this pull request Aug 12, 2022
…he#3287)

Signed-off-by: zhangyang21 <zhangyang21@xiaomi.com>
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

8 participants