-
Notifications
You must be signed in to change notification settings - Fork 25.2k
[CCR] Only auto follow indices when all primary shards have started #35814
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
[CCR] Only auto follow indices when all primary shards have started #35814
Conversation
This change adds an extra check that verifies that all primary shards have been started of an index that is about to be auto followed. If not all primary shards have been started for an index then the next auto follow run will try to follow to auto follow this index again. Closes elastic#35480
Pinging @elastic/es-distributed |
if (followedIndexUUIDs.contains(leaderIndexMetaData.getIndex().getUUID()) == false) { | ||
IndexRoutingTable indexRoutingTable = leaderClusterState.routingTable().index(leaderIndexMetaData.getIndex()); | ||
if (indexRoutingTable != null && | ||
indexRoutingTable.allPrimaryShardsActive() && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Can you leave a comment explaining this though?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
I will wait with backporting to the 6.5 branch, when 6.5.2 has been released. |
You can backport this now, no risk in doing so, and no need to wait IMO. |
Thanks @jasontedor for checking. I've backported the bug fix to the 6.5 branch. |
This change adds an extra check that verifies that all primary shards
have been started of an index that is about to be auto followed.
If not all primary shards have been started for an index
then the next auto follow run will try to follow to auto follow
this index again.
Closes #35480