Remove assertExecuteOnStartThread from AbstractSearchAsyncAction#121922
Merged
original-brownbear merged 1 commit intoelastic:mainfrom Feb 7, 2025
original-brownbear:drop-outdated-assertion
Merged
Remove assertExecuteOnStartThread from AbstractSearchAsyncAction#121922original-brownbear merged 1 commit intoelastic:mainfrom original-brownbear:drop-outdated-assertion
original-brownbear merged 1 commit intoelastic:mainfrom
original-brownbear:drop-outdated-assertion
Conversation
This is a really strange assertion. I get that it tries to make sure we skip unavailable without forking but this makes extending the AbstractSearchAsyncAction cleanly for batched execution needlessly hard and some of the assertion is dead code already because can-match isn't going through this codepath anymore. -> lets remove it, the code is simple enough now to follow that there's no forking here IMO
Collaborator
|
Pinging @elastic/es-search-foundations (Team:Search Foundations) |
javanna
approved these changes
Feb 7, 2025
Contributor
javanna
left a comment
There was a problem hiding this comment.
For the record, the assertion comes from #71580. I agree that it's a weird one. Perhaps we could add a comment to failOnUnavailable to signal that we don't fork its execution as we don't expect recursive calls to it. Maybe that's redundant though, I am not sure myself.
Contributor
Author
|
Thanks Luca :) I think there's no need for a comment, maybe we can actually just inline the method own the line (but shortly :)). |
Collaborator
💔 Backport failed
You can use sqren/backport to manually backport by running |
elasticsearchmachine
pushed a commit
that referenced
this pull request
Feb 18, 2025
…1922) (#121998) This is a really strange assertion. I get that it tries to make sure we skip unavailable without forking but this makes extending the AbstractSearchAsyncAction cleanly for batched execution needlessly hard and some of the assertion is dead code already because can-match isn't going through this codepath anymore. -> lets remove it, the code is simple enough now to follow that there's no forking here IMO Co-authored-by: Dimitris Rempapis <dimitris.rempapis@elastic.co>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a really strange assertion. I get that it tries to make sure we skip unavailable without forking but this makes extending the AbstractSearchAsyncAction cleanly for batched execution needlessly hard and some of the assertion is dead code already because can-match isn't going through this codepath anymore.
-> lets remove it, the code is simple enough now to follow that there's no forking here IMO