Skip to content

Do not allow put mapping on follower#37675

Merged
dnhatn merged 7 commits intoelastic:masterfrom
dnhatn:put-mapping-origin
Jan 24, 2019
Merged

Do not allow put mapping on follower#37675
dnhatn merged 7 commits intoelastic:masterfrom
dnhatn:put-mapping-origin

Conversation

@dnhatn
Copy link
Copy Markdown
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/CCR Issues around the Cross Cluster State Replication features v6.7.0 labels Jan 22, 2019
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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/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