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
Wait for required mappings to be available on the replica before indexing. #10786
Wait for required mappings to be available on the replica before indexing. #10786
Conversation
@s1monw I assigned it to you. |
public String toString() { | ||
try { | ||
XContentBuilder builder = JsonXContent.contentBuilder(); | ||
toXContent(builder, new MapParams(Collections.<String, String>emptyMap())); |
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.
we have ToXContent.EMPTY_PARAMS
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 really wonder if we should have Strings.toString(ToXcontent x)
I think we have this code in a lot of places
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.
+1
i left a bunch of comments, the only thing that I am concerned is not having a timeout... somehow we need to figure this out what to do if we pile up lots of requests? Maybe we can open a blocker issue to follow up on this? |
I pushed a new commit. Regarding the timeout, you know this code better than me, I'm not as much aware of the consequences as you are. However @bleskes seemed to consider that having no timeout was better (please correct me if I misunderstood). For the record, having no timeout also allows to not call |
Looks good on my end, I think we should push as it is and open a followup to re-evaluate the approach. Makes sense? |
…efore indexing. Due to timing issues, mappings that are required to index a document might not be available on the replica at indexing time. In that case the replica starts listening to cluster state changes and re-parses the document until no dynamic mappings updates are generated.
ff5c470
to
3e5b8a2
Compare
I opened #10797 |
Internal: Wait for required mappings to be available on the replica before indexing.
For the record I tagged as |
Due to timing issues, mappings that are required to index a document might not
be available on the replica at indexing time. In that case the replica starts
listening to cluster state changes and re-parses the document until no dynamic
mappings updates are generated.