-
Notifications
You must be signed in to change notification settings - Fork 8
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
Adding cache eviction and listener for invalidating index field type … #142
Conversation
…mappings on index deletion/update Signed-off-by: Ankit Jain <[email protected]>
Signed-off-by: Ankit Jain <[email protected]>
Signed-off-by: Ankit Jain <[email protected]>
Signed-off-by: Ankit Jain <[email protected]>
Existing tests still failing. Please take a look @jainankitk |
Looks like one of the reasons of the build failures is the license headers:
|
...main/java/org/opensearch/plugin/insights/core/service/categorizer/IndicesFieldTypeCache.java
Outdated
Show resolved
Hide resolved
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, left 1 minor comment.
@jainankitk do you think we should add the cache size as part of the healthcheck API as well?
Also we need to add the license header as caught by the build.
...main/java/org/opensearch/plugin/insights/core/service/categorizer/IndicesFieldTypeCache.java
Outdated
Show resolved
Hide resolved
...main/java/org/opensearch/plugin/insights/core/service/categorizer/IndicesFieldTypeCache.java
Show resolved
Hide resolved
...main/java/org/opensearch/plugin/insights/core/service/categorizer/IndicesFieldTypeCache.java
Outdated
Show resolved
Hide resolved
...main/java/org/opensearch/plugin/insights/core/service/categorizer/IndicesFieldTypeCache.java
Outdated
Show resolved
Hide resolved
...main/java/org/opensearch/plugin/insights/core/service/categorizer/IndicesFieldTypeCache.java
Show resolved
Hide resolved
...main/java/org/opensearch/plugin/insights/core/service/categorizer/IndicesFieldTypeCache.java
Show resolved
Hide resolved
...main/java/org/opensearch/plugin/insights/core/service/categorizer/IndicesFieldTypeCache.java
Show resolved
Hide resolved
src/main/java/org/opensearch/plugin/insights/core/service/categorizer/QueryShapeGenerator.java
Show resolved
Hide resolved
src/main/java/org/opensearch/plugin/insights/core/service/categorizer/QueryShapeGenerator.java
Show resolved
Hide resolved
src/main/java/org/opensearch/plugin/insights/core/service/categorizer/QueryShapeGenerator.java
Show resolved
Hide resolved
if its quick can add unit tests to make sure cache is utilized and evicting properly? |
would be good to have this as part of the health check APIs in case we see performance issues and need to debug @ansjcy |
Thanks @jainankitk, LGTM overall. Only pending items seem to be:
|
Signed-off-by: Ankit Jain <[email protected]>
Signed-off-by: Ankit Jain <[email protected]>
Signed-off-by: Ankit Jain <[email protected]>
...main/java/org/opensearch/plugin/insights/core/service/categorizer/IndicesFieldTypeCache.java
Show resolved
Hide resolved
#142) * Adding cache eviction and listener for invalidating index field type mappings on index deletion/update Signed-off-by: Ankit Jain <[email protected]> * Fixing spotless violations Signed-off-by: Ankit Jain <[email protected]> * Fixing code to use .index instead of .findMappings Signed-off-by: Ankit Jain <[email protected]> * Fixing spotless violations Signed-off-by: Ankit Jain <[email protected]> * Addressing review comments Signed-off-by: Ankit Jain <[email protected]> * Fixing existing test failures Signed-off-by: Ankit Jain <[email protected]> * Fixing existing test failures Signed-off-by: Ankit Jain <[email protected]> --------- Signed-off-by: Ankit Jain <[email protected]> (cherry picked from commit fb24118) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
#142) (#143) * Adding cache eviction and listener for invalidating index field type mappings on index deletion/update * Fixing spotless violations * Fixing code to use .index instead of .findMappings * Fixing spotless violations * Addressing review comments * Fixing existing test failures * Fixing existing test failures --------- (cherry picked from commit fb24118) Signed-off-by: Ankit Jain <[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>
…mappings on index deletion/update
Description
This change primarily achieves 2 things:
Issues Resolved
List any issues this PR will resolve, e.g. Closes [...].
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.