Skip to content
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

Harden field-caps request dispatcher #108736

Merged
merged 9 commits into from
May 20, 2024
Merged

Conversation

dnhatn
Copy link
Member

@dnhatn dnhatn commented May 16, 2024

ExceptionHelper#useAndSuppress can throw exceptions if both input exceptions having the same root cause. If this happens, the field-caps request dispatcher might fail to notify the completion to the caller. I found this while running ES|QL with disruptions.

Relates #107347

@dnhatn dnhatn added :Search/Search Search-related issues that do not fall into other categories >non-issue v8.14.1 labels May 16, 2024
@dnhatn dnhatn marked this pull request as ready for review May 16, 2024 19:16
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search (Team:Search)

@elasticsearchmachine elasticsearchmachine added the Team:Search Meta label for search team label May 16, 2024
@dnhatn dnhatn added >bug and removed >non-issue labels May 16, 2024
@elasticsearchmachine
Copy link
Collaborator

Hi @dnhatn, I've created a changelog YAML for you.

@dnhatn dnhatn requested a review from nik9000 May 17, 2024 15:47
Copy link
Member

@nik9000 nik9000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. And you can group the same exceptions together.

Copy link
Member

@original-brownbear original-brownbear left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little hesitant to let exceptions bubble up after we resolve the completion callback, see my inline comment. WDYT? This seems like it will make reasoning about where what exception is handled very complicated?

assert removed != null;
onIndexFailure.accept(failedIndex, e);
}
} finally {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it make more sense to quietly record the individual index failure (so essentially catch/suppress inside the loop) instead of propagating a somewhat expected exception further?

Copy link
Member Author

@dnhatn dnhatn May 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++, I pushed 1899f36 and 63e72d9

@dnhatn
Copy link
Member Author

dnhatn commented May 20, 2024

@nik9000 @original-brownbear Thanks for reviewing.

@dnhatn dnhatn added the auto-backport-and-merge Automatically create backport pull requests and merge when ready label May 20, 2024
@dnhatn dnhatn merged commit 05a2046 into elastic:main May 20, 2024
15 checks passed
@dnhatn dnhatn deleted the harden-field-caps branch May 20, 2024 17:58
dnhatn added a commit to dnhatn/elasticsearch that referenced this pull request May 20, 2024
ExceptionHelper#useAndSuppress can throw exceptions if both input 
exceptions having the same root cause. If this happens, the field-caps
request dispatcher might fail to notify the completion to the caller. I
found this while running ES|QL with disruptions.

Relates elastic#107347
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.14

elasticsearchmachine pushed a commit that referenced this pull request May 20, 2024
ExceptionHelper#useAndSuppress can throw exceptions if both input 
exceptions having the same root cause. If this happens, the field-caps
request dispatcher might fail to notify the completion to the caller. I
found this while running ES|QL with disruptions.

Relates #107347
jedrazb pushed a commit to jedrazb/elasticsearch that referenced this pull request May 21, 2024
ExceptionHelper#useAndSuppress can throw exceptions if both input 
exceptions having the same root cause. If this happens, the field-caps
request dispatcher might fail to notify the completion to the caller. I
found this while running ES|QL with disruptions.

Relates elastic#107347
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport-and-merge Automatically create backport pull requests and merge when ready >bug :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team v8.14.1 v8.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants