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

Fix Null Pointer Exception and Improve Handling for Missing Config Index #1234

Merged
merged 1 commit into from
Jun 10, 2024

Conversation

kaituo
Copy link
Collaborator

@kaituo kaituo commented Jun 10, 2024

Description

This PR addresses two issues to enhance robustness in the IndexManagement class:

  • Null Check for Candidate Result Aliases:
  • Added a null check for candidateResultAliases in updateCustomResultIndexMapping to prevent NullPointerExceptions.
  • Graceful Handling for Missing Config Index:
    • Modified searchConfigs to return an empty list instead of throwing a ResourceNotFoundException when the config index does not exist.

Testing:

  • Verified that NullPointerExceptions are prevented and the system gracefully handles cases where the config index does not exist.

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.

This PR addresses two issues to enhance robustness in the IndexManagement class:

* Null Check for Candidate Result Aliases:
 * Added a null check for candidateResultAliases in updateCustomResultIndexMapping to prevent NullPointerExceptions.
* Graceful Handling for Missing Config Index:
  * Modified searchConfigs to return an empty list instead of throwing a ResourceNotFoundException when the config index does not exist.

Testing:
* Verified that NullPointerExceptions are prevented and the system gracefully handles cases where the config index does not exist.

Signed-off-by: Kaituo Li <[email protected]>
@kaituo kaituo merged commit 2843d1b into opensearch-project:main Jun 10, 2024
25 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jun 10, 2024
…dex (#1234)

This PR addresses two issues to enhance robustness in the IndexManagement class:

* Null Check for Candidate Result Aliases:
 * Added a null check for candidateResultAliases in updateCustomResultIndexMapping to prevent NullPointerExceptions.
* Graceful Handling for Missing Config Index:
  * Modified searchConfigs to return an empty list instead of throwing a ResourceNotFoundException when the config index does not exist.

Testing:
* Verified that NullPointerExceptions are prevented and the system gracefully handles cases where the config index does not exist.

Signed-off-by: Kaituo Li <[email protected]>
(cherry picked from commit 2843d1b)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
kaituo pushed a commit that referenced this pull request Jun 10, 2024
…dex (#1234) (#1235)

This PR addresses two issues to enhance robustness in the IndexManagement class:

* Null Check for Candidate Result Aliases:
 * Added a null check for candidateResultAliases in updateCustomResultIndexMapping to prevent NullPointerExceptions.
* Graceful Handling for Missing Config Index:
  * Modified searchConfigs to return an empty list instead of throwing a ResourceNotFoundException when the config index does not exist.

Testing:
* Verified that NullPointerExceptions are prevented and the system gracefully handles cases where the config index does not exist.


(cherry picked from commit 2843d1b)

Signed-off-by: Kaituo Li <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants