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.
martijnvg
left a comment
There was a problem hiding this comment.
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
jasontedor
left a comment
There was a problem hiding this comment.
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! |
|
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