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

[Bug] corner case, pop of retryTopic from maxOffset will skip a few messages incorrectly when EscapeBridge enabled #8402

Closed
3 tasks done
imzs opened this issue Jul 19, 2024 · 0 comments · Fixed by #8404
Closed
3 tasks done

Comments

@imzs
Copy link
Contributor

imzs commented Jul 19, 2024

Before Creating the Bug Report

  • I found a bug, not just asking a question, which should be created in GitHub Discussions.

  • I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.

  • I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.

Runtime platform environment

All

RocketMQ version

5.x

JDK Version

All

Describe the Bug

See commit:
f868d99

We've fixed the issue that pop from maxOffset when retryTopic created, but things become a bit more complex when EscapeBridge enabled.

  1. addRetryTopicIfNotExist in current brokerA(probably a slave broker)
  2. enableSlaveActingMaster and enableRemoteEscape both set true
  3. send to remote brokerB
  4. brokerB has no retry for now and thus no retry offset committed
  5. consumer runs in ConsumeInitMode.MAX and one or more judgements in getInitOffset() return false

then we face the same issue as f868d99, that's why we describe it as a corner case.
We'd better fix it in an upper place, getInitOffset(), ignore the initMode and use minOffset, distinguishing between normal and retry topic seems more logical.

Steps to Reproduce

See Above

What Did You Expect to See?

pop retry from minOffset=0

What Did You See Instead?

pop retry from maxOffset

Additional Context

No response

imzs added a commit to imzs/rocketmq that referenced this issue Jul 19, 2024
…ssages incorrectly when EscapeBridge enabled

- fix typo
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 a pull request may close this issue.

1 participant