Repository navigation
Fix index not found reported as server error bug - #1353
Merged
dai-chen merged 2 commits intoFeb 17, 2023
Merged
Conversation
Signed-off-by: Chen Dai <[email protected]>
Yury-Fridlyand
previously approved these changes
Feb 16, 2023
Yury-Fridlyand
left a comment
Collaborator
There was a problem hiding this comment.
Maybe add an integration test which proves the fix in the end-to-end flow?
Signed-off-by: Chen Dai <[email protected]>
Collaborator
Author
Yes, just found a place to add it. |
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #1353 +/- ##
=========================================
Coverage 98.38% 98.38%
Complexity 3693 3693
=========================================
Files 343 343
Lines 9106 9107 +1
Branches 585 585
=========================================
+ Hits 8959 8960 +1
Misses 142 142
Partials 5 5
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Yury-Fridlyand
approved these changes
Feb 17, 2023
penghuo
approved these changes
Feb 17, 2023
opensearch-trigger-bot Bot
pushed a commit
that referenced
this pull request
Feb 17, 2023
* Capture IndexNotFoundException and re-throw directly Signed-off-by: Chen Dai <[email protected]> * Add IT Signed-off-by: Chen Dai <[email protected]> --------- Signed-off-by: Chen Dai <[email protected]> (cherry picked from commit 76a8d29)
opensearch-trigger-bot Bot
pushed a commit
that referenced
this pull request
Feb 17, 2023
* Capture IndexNotFoundException and re-throw directly Signed-off-by: Chen Dai <[email protected]> * Add IT Signed-off-by: Chen Dai <[email protected]> --------- Signed-off-by: Chen Dai <[email protected]> (cherry picked from commit 76a8d29)
dai-chen
added a commit
that referenced
this pull request
Feb 17, 2023
* Capture IndexNotFoundException and re-throw directly Signed-off-by: Chen Dai <[email protected]> * Add IT Signed-off-by: Chen Dai <[email protected]> --------- Signed-off-by: Chen Dai <[email protected]> (cherry picked from commit 76a8d29) Co-authored-by: Chen Dai <[email protected]>
dai-chen
added a commit
that referenced
this pull request
Feb 17, 2023
* Capture IndexNotFoundException and re-throw directly Signed-off-by: Chen Dai <[email protected]> * Add IT Signed-off-by: Chen Dai <[email protected]> --------- Signed-off-by: Chen Dai <[email protected]> (cherry picked from commit 76a8d29) Co-authored-by: Chen Dai <[email protected]>
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.
Description
IndexNotFoundExceptionthrown from OpenSearch get index mapping API is treated as server error. This caused breaking behavior as reported in issue below. More importantly, this may cause false alarm if monitoring logic on SQL plugin.Root Cause
Due to security concern, we switched from OpenSearch's
ClusterService.getIndexMapping()to our currentOpenSearchNodeClient.getIndexMapping(). OpenSearchNodeClient captures every exception thrown from underlying OpenSearch API, includingIndexNotFoundException, and wrap it byIllegalStateException. On the high level,isClientError()determines if this is a client error on IllegalStateException instead of the IndexNotFoundException wrapped inside.Quick Fix
resolverfield andmockNodeClient()handyIssues Resolved
#851
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.