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] SlaveActingMaster Timer Message retry without escape logic #7577

Closed
3 tasks done
AYue-94 opened this issue Nov 22, 2023 · 0 comments · Fixed by #7578
Closed
3 tasks done

[Bug] SlaveActingMaster Timer Message retry without escape logic #7577

AYue-94 opened this issue Nov 22, 2023 · 0 comments · Fixed by #7578

Comments

@AYue-94
Copy link
Contributor

AYue-94 commented Nov 22, 2023

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

MacOS

RocketMQ version

5.1.1

JDK Version

8

Describe the Bug

In slaveActingMaster mode, when master down, minId slave broker become proxy master.
When proxy master put timer message back to commitlog fail on first time, it may lost escape logic.

public int doPut(MessageExtBrokerInner message, boolean roll) throws Exception {

while (retryNum < 3) {
          // ...
          Thread.sleep(50);
          putMessageResult = messageStore.putMessage(message); // focus here
          LOGGER.warn("Retrying to do put timer msg retryNum:{} putRes:{} msg:{}", retryNum, putMessageResult, message);
      }
}

Steps to Reproduce

  1. enable slaveActingMaster(NameServer&Broker);
  2. producer send some timer message;
  3. master down;
  4. minId slave become proxy master,begin to scan timer message;

What Did You Expect to See?

timer message put back to commitlog fail, it should has escape logic when retry.

What Did You See Instead?

proxy master directly write its commitlog, although it will fail because slave is readonly.

Additional Context

No response

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