rocketmq icon indicating copy to clipboard operation
rocketmq copied to clipboard

[ISSUE #4771]In HA mode, if you do not truncate consumerOffsetMap, it may cause a bug

Open fujian-zfj opened this issue 2 years ago • 3 comments

BUG REPORT close #4771 image

fujian-zfj avatar Aug 08 '22 07:08 fujian-zfj

Good point!

hzh0425 avatar Aug 08 '22 08:08 hzh0425

@RongtongJin The truncation may also need to be done when the broker role changes.

dongeforever avatar Aug 08 '22 09:08 dongeforever

@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.

RongtongJin avatar Aug 09 '22 02:08 RongtongJin

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?

lizhanhui avatar Aug 11 '22 03:08 lizhanhui

Codecov Report

Merging #4797 (48968f3) into develop (64c18fb) will decrease coverage by 0.00%. The diff coverage is 2.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

codecov-commenter avatar Aug 28 '22 10:08 codecov-commenter

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.

github-actions[bot] avatar Aug 30 '23 00:08 github-actions[bot]

This PR was closed because it has been inactive for 3 days since being marked as stale.

github-actions[bot] avatar Sep 03 '23 00:09 github-actions[bot]