-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Conversation
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.
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.
Left one comment, but LGTM. When I thought about this, I also saw no other way to implement this without introducing an extension point.
x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/action/CcrRequests.java
Outdated
Show resolved
Hide resolved
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.
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?
+1. I pushed d2a61d5 to remove the origin from the validator and documentation. @jasontedor Could you please have another look? Thank you! |
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.
Thanks @martijnvg and @jasontedor for reviewing. |
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. Thus, we should prevent users
from modifying the mapping on the follower indices.
Relates #30086