forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Propagate status codes from shard failures appropriately (elastic#118016
) (elastic#119205) * Return 502 if the underlying error is `NodeNotConnectedException` * Traverse through the cause stack trace and check for `NodeNotConnectedException` and undo `status()` override in `NodeDisconnectedException` * Rewrite `while` condition * Fix: precommit * Let status codes propagate rather than walking the stacktrace explicitly Walking the stacktrace explicitly and looking for a specific error (node connection-related errors in this case) is a workaround rather than a proper fix. Instead, let the status codes propagate all the way to the top so that they can be reported as-is. * Fix: unused import * Fix null deref * Do not map descendants of `ConnectTransportException` to `502` * Fix: precommit * Do not account for 4xx status codes 4xx status codes are not likely to appear along with 5xx status codes. As a result, we do not need to account for them when looking at shard failures' status codes. * Remove unnecessary `switch` case In reference to the previous commit: this case is no longer needed. * Rewrite code comment * Address review comments * [CI] Auto commit changes from spotless * Update docs/changelog/118016.yaml --------- Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
- Loading branch information
1 parent
013f363
commit 5e9f907
Showing
3 changed files
with
74 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pr: 118016 | ||
summary: Propagate status codes from shard failures appropriately | ||
area: Search | ||
type: enhancement | ||
issues: | ||
- 118482 |
This file contains 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
This file contains 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