-
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
Put mapping operations must update metadata of all types. #16264
Put mapping operations must update metadata of all types. #16264
Conversation
@rjernst could you give it a look? |
@@ -320,28 +319,24 @@ private ClusterState applyRequest(ClusterState currentState, PutMappingClusterSt | |||
|
|||
} | |||
} else { |
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.
Is this else really necessary anymore? Looks like just some logging?
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.
It is logging only indeed. But whether or not to log things tends to be a bit controversial so I'd rather do it in another change if we want to remove it
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.
Sure, it was just an observation. :)
LGTM |
Today put mapping operations only update metadata of the type that is being modified, which is not enough since some modifications may have side-effects on other types. Closes elastic#16239
c57ab2e
to
4ab7a18
Compare
…_types Put mapping operations must update metadata of all types.
@jpountz This is a pretty bad bug for mapping validation, and the fix is relatively simple. Should we put it into 2.2.1? |
+1 to 2.2.1 and also port it to 2.1 in case we do a bugfix release there too? |
The problem is that 2.2 has another bug: when you update a mapping with |
Is there a workaround for 2.2? This bug is a really bad bug to leave like it is. |
@travisjeffery the workaround would be to explicitly send updates to every type that contains the field you are changing. |
@rjernst @travisjeffery there is no way to do that. The update-mapping API only works on a single type at a time. The only time you can set the mapping for multiple types is at index creation. |
@clintongormley It does work. Updating them in one internal method call doesn't matter. We just need to get the mappings in memory back into the correct state.
|
Ah I see what you mean: using multiple calls to update mapping, ok |
es 5.2 , I have many types. How can I add my new field to each type . I tryed put mapping with |
Today put mapping operations only update metadata of the type that is being
modified, which is not enough since some modifications may have side-effects
on other types.
Closes #16239