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

[CCR] Don't auto follow follow indices in the same cluster. #33944

Conversation

martijnvg
Copy link
Member

No description provided.

@martijnvg martijnvg added review :Distributed Indexing/CCR Issues around the Cross Cluster State Replication features labels Sep 21, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

@martijnvg martijnvg force-pushed the ccr_do_not_auto_follow_follow_indices_in_the_same_cluster branch from 006313b to 006f583 Compare September 21, 2018 13:27
Copy link
Member

@dnhatn dnhatn left a comment

Choose a reason for hiding this comment

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

Thanks @martijnvg for fixing this :). I left a comment but I might be wrong.

// that both leader and follow index are in the same cluster otherwise this can
// result into an index creation explosion.
if (leaderIndexMetaData.getCustomData(Ccr.CCR_CUSTOM_METADATA_KEY) != null &&
leaderClusterState.getClusterName().equals(followerClusterState.getClusterName())) {
Copy link
Member

Choose a reason for hiding this comment

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

I am not sure if we should use the cluster name since the local and remote cluster can have the same name (I might be wrong here). Should we check if the cluster alias is "local"?

Copy link
Member Author

Choose a reason for hiding this comment

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

I am not sure if we should use the cluster name since the local and remote cluster can have the same name (I might be wrong here).

True, that is possible, although I think must users would have different names for different clusters.

Should we check if the cluster alias is "local"?

Yes, I think that does the trick too and that is the actual scenario we do want the auto follow coordinator to not auto follow follower indices. I pushed this: df20939

Copy link
Member

@dnhatn dnhatn left a comment

Choose a reason for hiding this comment

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

Thanks for an extra iteration. LGTM.

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

Successfully merging this pull request may close these issues.

5 participants