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
Report conflict when trying to disable _ttl
#7316
Conversation
Also, add a line about that it can never be disabled after it was enabled.
_ttl could never be disabled once it was enabled. But when trying to, no conflict was reported. relates to elastic#777 and elastic#7293
@@ -238,12 +239,14 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws | |||
@Override | |||
public void merge(Mapper mergeWith, MergeContext mergeContext) throws MergeMappingException { | |||
TTLFieldMapper ttlMergeWith = (TTLFieldMapper) mergeWith; | |||
if (!mergeContext.mergeFlags().simulate()) { |
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.
I think you should not ignore it completely? The contract is that is simulate
is true then conflicts are reported but changes are not performed.
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.
Yes! Thank god for code reviews...
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.
I added a commit and tests for this that were missing before
Adressed all comments. |
LGTM |
_ttl
_ttl
_ttl
_ttl could never be disabled once it was enabled.
But when trying to, no conflict was reported.
relates to #777 and #7293