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] Concurrent modify syncStateSet and Mark synchronizing frequently when shrink #7219

Closed
3 tasks done
echooymxq opened this issue Aug 22, 2023 · 1 comment · Fixed by #7220
Closed
3 tasks done

Comments

@echooymxq
Copy link
Contributor

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

Linux

RocketMQ version

develop

JDK Version

openjdk8

Describe the Bug

// If the slaveBrokerId is in syncStateSet but not in connectionCaughtUpTimeTable,
// it means that the broker has not connected.
for (Long slaveBrokerId : newSyncStateSet) {
if (!this.connectionCaughtUpTimeTable.containsKey(slaveBrokerId)) {
newSyncStateSet.remove(slaveBrokerId);
isSyncStateSetChanged = true;
}
}

  1. The newSyncStateSet foreach maybe ConcurrentModificationException and cause the checkSyncStateSetTask stop forever.

  2. The connectionCaughtUpTimeTable always not contain masterBrokerId, it will cause mark synchronizing frequently when shrink syncStateSet.

Steps to Reproduce

Use the latest develop branch code, just run in controller mode.

What Did You Expect to See?

No error happen or No shrink if the syncStateSet no change.

What Did You See Instead?

  1. shrink replication task stoped.

Additional Context

No response

@RongtongJin
Copy link
Contributor

@echooymxq Good catch!

RongtongJin pushed a commit that referenced this issue Aug 23, 2023
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.

2 participants