rocketmq
rocketmq copied to clipboard
[ISSUE #4771]In HA mode, if you do not truncate consumerOffsetMap, it may cause a bug
BUG REPORT
close #4771
Good point!
@RongtongJin The truncation may also need to be done when the broker role changes.
@RongtongJin The truncation may also need to be done when the broker role changes.
Yes, when the broker role changes, commit log and consume queue have been truncated, but consumer offset has not been corrected. This PR will correct consumer offset.
As I pointed out here, this fix is a kind of a walkaround. Should we invest more effort in the design flaw or correct the design issue itself?
Codecov Report
Merging #4797 (48968f3) into develop (64c18fb) will decrease coverage by
0.00%
. The diff coverage is2.43%
.
@@ Coverage Diff @@
## develop #4797 +/- ##
=============================================
- Coverage 43.29% 43.29% -0.01%
- Complexity 7688 7703 +15
=============================================
Files 991 994 +3
Lines 68781 68979 +198
Branches 9111 9144 +33
=============================================
+ Hits 29782 29866 +84
- Misses 35253 35365 +112
- Partials 3746 3748 +2
Impacted Files | Coverage Δ | |
---|---|---|
.../rocketmq/broker/offset/ConsumerOffsetManager.java | 27.89% <0.00%> (-4.23%) |
:arrow_down: |
...n/java/org/apache/rocketmq/store/MessageStore.java | 0.00% <ø> (ø) |
|
...apache/rocketmq/store/timer/TimerMessageStore.java | 53.70% <0.00%> (-0.59%) |
:arrow_down: |
...org/apache/rocketmq/store/DefaultMessageStore.java | 55.23% <14.28%> (-0.23%) |
:arrow_down: |
...or/validator/DefaultTopicMessageTypeValidator.java | 40.00% <0.00%> (-10.00%) |
:arrow_down: |
...e/rocketmq/controller/impl/manager/BrokerInfo.java | 78.94% <0.00%> (-9.29%) |
:arrow_down: |
...ocketmq/controller/impl/manager/SyncStateInfo.java | 83.33% <0.00%> (-7.58%) |
:arrow_down: |
...he/rocketmq/controller/impl/DLedgerController.java | 69.51% <0.00%> (-3.46%) |
:arrow_down: |
...ketmq/client/impl/consumer/PullMessageService.java | 49.23% <0.00%> (-3.08%) |
:arrow_down: |
...ache/rocketmq/controller/impl/event/EventType.java | 73.68% <0.00%> (-2.79%) |
:arrow_down: |
... and 36 more |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
This PR is stale because it has been open for 365 days with no activity. It will be closed in 3 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this PR.
This PR was closed because it has been inactive for 3 days since being marked as stale.