rocketmq icon indicating copy to clipboard operation
rocketmq copied to clipboard

[RIP-70-1] Optimizing Lock Mechanisms

Open 3424672656 opened this issue 1 year ago • 1 comments
trafficstars

Which Issue(s) This PR Fixes

Fixes #8442

Brief Description

The pr implements the Phase 1 change of RIP-70

  • [x] Optimize message delivery logic and delete TopicQueueLock

  • [x] Optimize the back pressure mechanism of the client,Fixed inaccuracies caused by dynamic adjustment of semaphore

  • [x] The locking mechanism of retreat strategy is introduced and provides a configuration change interface

How Did You Test This Change?

The cluster is tested with openchaos, injection fault: random-suspend,major-kill

Documentation containing specific modifications and chaos tests:https://shimo.im/docs/0l3NMnen8GFGDaAR

3424672656 avatar Jul 25 '24 06:07 3424672656

Codecov Report

Attention: Patch coverage is 63.51706% with 139 lines in your changes missing coverage. Please review.

Project coverage is 47.19%. Comparing base (5d43e7d) to head (ba88041).

Files with missing lines Patch % Lines
...main/java/org/apache/rocketmq/store/CommitLog.java 47.72% 51 Missing and 18 partials :warning:
...mq/client/impl/producer/DefaultMQProducerImpl.java 51.42% 13 Missing and 4 partials :warning:
...pache/rocketmq/store/dledger/DLedgerCommitLog.java 76.38% 14 Missing and 3 partials :warning:
...g/apache/rocketmq/store/lock/AdaptiveLockImpl.java 73.21% 12 Missing and 3 partials :warning:
...ache/rocketmq/store/lock/CollisionRetreatLock.java 64.70% 6 Missing :warning:
.../apache/rocketmq/client/lock/ReadWriteCASLock.java 75.00% 2 Missing and 3 partials :warning:
...ache/rocketmq/store/config/MessageStoreConfig.java 37.50% 5 Missing :warning:
...he/rocketmq/client/producer/DefaultMQProducer.java 88.46% 3 Missing :warning:
...a/org/apache/rocketmq/store/lock/AdaptiveLock.java 0.00% 2 Missing :warning:
Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #8444      +/-   ##
=============================================
- Coverage      47.24%   47.19%   -0.06%     
- Complexity     11485    11486       +1     
=============================================
  Files           1277     1280       +3     
  Lines          89430    89569     +139     
  Branches       11502    11518      +16     
=============================================
+ Hits           42254    42270      +16     
- Misses         41970    42084     +114     
- Partials        5206     5215       +9     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Jul 25 '24 07:07 codecov-commenter