Skip to content

[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

Merged
merged 3 commits into from
Nov 29, 2018

Conversation

martijnvg
Copy link
Member

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

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
@martijnvg martijnvg added >bug v7.0.0 :Distributed Indexing/CCR Issues around the Cross Cluster State Replication features v6.6.0 v6.5.2 labels Nov 22, 2018
@martijnvg martijnvg requested a review from jasontedor November 22, 2018 10:17
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

if (followedIndexUUIDs.contains(leaderIndexMetaData.getIndex().getUUID()) == false) {
IndexRoutingTable indexRoutingTable = leaderClusterState.routingTable().index(leaderIndexMetaData.getIndex());
if (indexRoutingTable != null &&
indexRoutingTable.allPrimaryShardsActive() &&
Copy link
Member

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?

Copy link
Member

@jasontedor jasontedor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@martijnvg martijnvg merged commit 1390f36 into elastic:master Nov 29, 2018
@martijnvg
Copy link
Member Author

I will wait with backporting to the 6.5 branch, when 6.5.2 has been released.

martijnvg added a commit that referenced this pull request Nov 29, 2018
…35814)

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
@jasontedor
Copy link
Member

You can backport this now, no risk in doing so, and no need to wait IMO.

martijnvg added a commit that referenced this pull request Nov 29, 2018
…35814)

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
@martijnvg
Copy link
Member Author

Thanks @jasontedor for checking. I've backported the bug fix to the 6.5 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Distributed Indexing/CCR Issues around the Cross Cluster State Replication features v6.5.2 v6.6.0 v7.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants