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

Do not allow put mapping on follower #37675

Merged
merged 7 commits into from
Jan 24, 2019
Merged

Conversation

dnhatn
Copy link
Member

@dnhatn dnhatn commented Jan 22, 2019

Today, the mapping on the follower is managed and replicated from its
leader index by the ShardFollowTask. Thus, we should prevent users
from modifying the mapping on the follower indices.

Relates #30086

Today, the mapping on the follower is managed and replicated from its
leader index by the ShardFollowTask. In other words, users should not
modify the mapping on the follower directly.
@dnhatn dnhatn added >enhancement v7.0.0 :Distributed Indexing/CCR Issues around the Cross Cluster State Replication features v6.7.0 labels Jan 22, 2019
Copy link
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

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

Left one comment, but LGTM. When I thought about this, I also saw no other way to implement this without introducing an extension point.

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.

The change looks good but I have one comment about the naming. We use "origin" as a concept in the security code base and I am concerned about the "origin" here being confused with the "origin" there. Since we are handing the entire mapping request to the validator (and not really any notion of "origin" or "source") I would be inclined to change the name to remove "origin" and simply say that they are put mapping request validators. What do you think?

@dnhatn
Copy link
Member Author

dnhatn commented Jan 24, 2019

We use "origin" as a concept in the security code base and I am concerned about the "origin" here being confused with the "origin" there. Since we are handing the entire mapping request to the validator (and not really any notion of "origin" or "source") I would be inclined to change the name to remove "origin" and simply say that they are put mapping request validators.

+1. I pushed d2a61d5 to remove the origin from the validator and documentation. @jasontedor Could you please have another look? Thank you!

@dnhatn dnhatn requested a review from jasontedor January 24, 2019 00:14
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.

@dnhatn
Copy link
Member Author

dnhatn commented Jan 24, 2019

Thanks @martijnvg and @jasontedor for reviewing.

@dnhatn dnhatn merged commit 76fb573 into elastic:master Jan 24, 2019
@dnhatn dnhatn deleted the put-mapping-origin branch January 24, 2019 17:13
dnhatn added a commit that referenced this pull request Jan 28, 2019
Today, the mapping on the follower is managed and replicated from its
leader index by the ShardFollowTask. Thus, we should prevent users
from modifying the mapping on the follower indices.

Relates #30086
dnhatn added a commit that referenced this pull request Jan 28, 2019
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 >enhancement v6.7.0 v7.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants