-
Notifications
You must be signed in to change notification settings - Fork 24.7k
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
Search during index create #66853
base: main
Are you sure you want to change the base?
Search during index create #66853
Conversation
When creating an index, the primary will be either unassigned or initializing for a short while. This causes issues when concurrent processes does searches hitting those indices, either explicitly, through patterns, aliases or data streams. This commit changes the behavior to disregard shards where the primary is inactive due to having just been created. Closes elastic#65846
Pinging @elastic/es-search (Team:Search) |
There is an edge case that needs handling before this can be reviewed. Sorry for the noise. |
Hi @henningandersen, I've created a changelog YAML for you. |
hi @henningandersen should we close this? |
Certainly the issue it was trying to fix, #65846, is still a problem that needs resolving somehow.
If that edge case is so difficult to fix that this whole change has to be scrapped then it would at least be good to write what it is on the issue so that any future attempts can try to avoid it. |
What was the edge case? The non-test code changes in this PR are very small, so it's a shame if this fix is completely blocked. I am wondering if internal clients could be allowed to opt to ignore the edge case if it is not too bad, or if we're careful where we opt to ignore it. That could be done using a request parameter that's not exposed on the REST layer so that it's limited to internal use cases. |
Thanks for bringing this up again David. The edge case is something like this:
It will be a rare edge case. I need to double check some things to see if it can also happen if we wait for yellow. |
Hi team, is there any chance that this PR can get tested and merged? |
Pinging @elastic/es-distributed (Team:Distributed) |
When creating an index, the primary will be either unassigned or
initializing for a short while. This causes issues when concurrent
processes does searches hitting those indices, either explicitly,
through patterns, aliases or data streams. This commit changes the
behavior to disregard shards where the primary is inactive due to
having just been created.
Closes #65846