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 #7511]Lock granularity issue causing LMQ message loss #7525

Merged

Conversation

DongyuanPan
Copy link
Contributor

@DongyuanPan DongyuanPan commented Nov 1, 2023

Which Issue(s) This PR Fixes

Fixes #7511

Brief Description

topicQueueLock cannot guarantee that the offset of LMQ is set correctly, so the offset maintenance of LMQ is placed in the critical section protected by putMessageLock.

How Did You Test This Change?

How Did You Test This Change?

@DongyuanPan DongyuanPan changed the title Develop fix lmq queue offset Lock granularity issue causing LMQ message loss Nov 1, 2023
@DongyuanPan DongyuanPan changed the title Lock granularity issue causing LMQ message loss [ISSUE #7511]Lock granularity issue causing LMQ message loss Nov 1, 2023
@DongyuanPan
Copy link
Contributor Author

DongyuanPan commented Nov 1, 2023

@pingww @RongtongJin plz, have a code review

@DongyuanPan
Copy link
Contributor Author

@guyinyou plz, have a code review

@codecov-commenter
Copy link

Codecov Report

Merging #7525 (ac69160) into develop (26fa050) will increase coverage by 0.06%.
Report is 1 commits behind head on develop.
The diff coverage is 74.01%.

@@              Coverage Diff              @@
##             develop    #7525      +/-   ##
=============================================
+ Coverage      42.98%   43.05%   +0.06%     
- Complexity      9674     9692      +18     
=============================================
  Files           1158     1159       +1     
  Lines          83982    84041      +59     
  Branches       10916    10923       +7     
=============================================
+ Hits           36102    36183      +81     
+ Misses         43380    43350      -30     
- Partials        4500     4508       +8     
Files Coverage Δ
...n/java/org/apache/rocketmq/store/ConsumeQueue.java 67.73% <100.00%> (-0.29%) ⬇️
...org/apache/rocketmq/store/DefaultMessageStore.java 46.64% <ø> (ø)
...ocketmq/store/queue/AbstractConsumeQueueStore.java 94.11% <100.00%> (+0.56%) ⬆️
...ache/rocketmq/store/queue/QueueOffsetOperator.java 87.80% <100.00%> (ø)
...ache/rocketmq/store/queue/RocksDBConsumeQueue.java 38.58% <ø> (+6.13%) ⬆️
...pache/rocketmq/store/queue/MultiDispatchUtils.java 61.90% <0.00%> (ø)
...rocketmq/common/message/MessageExtBrokerInner.java 52.83% <0.00%> (-3.17%) ⬇️
.../java/org/apache/rocketmq/store/MultiDispatch.java 87.09% <87.09%> (ø)
...a/org/apache/rocketmq/store/MessageExtEncoder.java 84.04% <78.26%> (-1.39%) ⬇️
...main/java/org/apache/rocketmq/store/CommitLog.java 58.68% <62.50%> (-0.25%) ⬇️

... and 16 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@RongtongJin
Copy link
Contributor

LGTM~

Copy link
Contributor

@guyinyou guyinyou left a comment

Choose a reason for hiding this comment

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

lgtm

@RongtongJin RongtongJin merged commit ead3d90 into apache:develop Nov 8, 2023
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Lock granularity issue causing LMQ message loss
4 participants