-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Handle index deletion while querying in ES|QL #137702
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
base: main
Are you sure you want to change the base?
Conversation
1ef957c to
ffcec0e
Compare
|
Hi @dnhatn, I've created a changelog YAML for you. |
|
Hi @dnhatn, I've updated the changelog YAML for you. |
|
Pinging @elastic/es-analytical-engine (Team:Analytics) |
| } | ||
| handler.messageReceived(request, channel, task); | ||
| }); | ||
| } |
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.
Very cute.
| private void expectNoFailure(String message, Exception e) { | ||
| LOGGER.error(message, e); | ||
| assert false : new AssertionError(message, e); | ||
| } |
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 believe the change to this file says "we expect no failures handling the response and if there is one log something big and loud and, if we're testing, crash loudly so we see if and fix it right away. If we're in production just be loud."
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, that's correct. In production, if a request enters this state, we will fail it fast and log the error.
| .toList(); | ||
| } catch (Exception ignored) { | ||
| continue; | ||
| } |
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.
Should we continue on any exception here or just the one we get from the index being deleted. Is that just IndexNotFoundException?
Would you kindly add a comment around continue; saying "this is a shard being deleted after we started the request"?
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, I added a comment in 691c5cd
If the index is deleted while querying, ES|QL might try to get the index routing from the latest cluster state. This could throw an index-not-found exception, which is not handled properly, causing the user to never receive a response, even though execution has completed. This also results in a dangling task in the task manager.
Relates #126653
Closes #135863