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
Show concrete error when enrich index not exist rather than NPE #99604
Conversation
Pinging @elastic/es-data-management (Team:Data Management) |
Thanks for contributing this! I don't know if this is for sure related to #96122 or if it just simply has the same error message, so I've left the issue unlinked in the change log entry. |
@elasticmachine ok to test |
@elasticmachine update branch |
I'm sure that's the same problem because that's a colleague of mine. 😸 He met the issue during a test but have no controll of that cluster(7.17.7), then after a few months I encounter the same problem in data center migration(7.12.0 -> 7.17.6) and get the detailed error log. Plus, after upgrading to latest 7.17.13, the problem is solved indeed. Thanks for your effort. |
Oh nice, didn't realize. Consider my previous suspicion invalidated 😄 It looks like there's just a couple of check style issues that I should be able to clear on my own. The change LGTM, I can merge it after we get a green CI build. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM pending green CI
💔 Backport failed
You can use sqren/backport to manually backport by running |
…tic#99604) There should be NullPointerException check and throw index not found exception to the response so the user can understand what happens with the enrich index --------- Co-authored-by: James Baiera <james.baiera@gmail.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
…) (#100107) There should be NullPointerException check and throw index not found exception to the response so the user can understand what happens with the enrich index --------- Co-authored-by: puppylpg <shininglhb@163.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
…tic#99604) There should be NullPointerException check and throw index not found exception to the response so the user can understand what happens with the enrich index --------- Co-authored-by: James Baiera <james.baiera@gmail.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
…tic#99604) There should be NullPointerException check and throw index not found exception to the response so the user can understand what happens with the enrich index --------- Co-authored-by: James Baiera <james.baiera@gmail.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> (cherry picked from commit ccc896d) # Conflicts: # x-pack/plugin/enrich/src/main/java/org/elasticsearch/xpack/enrich/EnrichCache.java # x-pack/plugin/enrich/src/test/java/org/elasticsearch/xpack/enrich/EnrichCacheTests.java
…) (#100155) There should be NullPointerException check and throw index not found exception to the response so the user can understand what happens with the enrich index --------- Co-authored-by: James Baiera <james.baiera@gmail.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> (cherry picked from commit ccc896d) # Conflicts: # x-pack/plugin/enrich/src/main/java/org/elasticsearch/xpack/enrich/EnrichCache.java # x-pack/plugin/enrich/src/test/java/org/elasticsearch/xpack/enrich/EnrichCacheTests.java Co-authored-by: puppylpg <shininglhb@163.com>
…tic#99604) There should be NullPointerException check and throw index not found exception to the response so the user can understand what happens with the enrich index --------- Co-authored-by: James Baiera <james.baiera@gmail.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
There should be NullPointerException check and throw index not found exception to the response so the user can understand what happens with the enrich index, rather than just "Caused by: java.lang.NullPointerException: Cannot invoke "org.elasticsearch.cluster.metadata.IndexAbstraction.getIndices()" because "ia" is null", which is confusing for user.
To solve #96122