-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Discover] Change context query to prevent duplicates #77014
[Discover] Change context query to prevent duplicates #77014
Conversation
@elasticmachine merge upstream |
…-09-discover-context-query-change
…github.com:kertal/kibana into kertal-pr-2020-09-09-discover-context-query-change
…-09-discover-context-query-change
Pinging @elastic/kibana-app (Team:KibanaApp) |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
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.
Code LGTM 👍 .
I tried to reproduce it locally, with no results 😓 .
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]async chunks size
History
To update your PR or re-run it, just comment with: |
Summary
Additionally to the cases that were fixed in #38873 there could be a
duplicates in a repeater are not allowed
error when the same document is returned with different_doc
values. The value of_doc
can differ e.g. if the same ES replica isn't used for 2 requests, or if there's a merge occurring between 2 requests (Context uses several requests to build the list, and in the error case the anchor document is also returned in the previous/next documents, with a different_doc
value, so the internal id that Angular uses to track the displayed records is no longer unique). This solution filters out the anchor document of the previous and next documents.fixes #76283
Note about testing: there is no good way to test this, AFAIK there is no reliable way to reproduce the state of differing
_doc
valuesChecklist
Delete any items that are not applicable to this PR.