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 skip caching factor with indices.queries.cache.all_segments #85510
Conversation
Pinging @elastic/es-search (Team:Search) |
Hi @dnhatn, I've created a changelog YAML for you. |
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.
This looks good to me. I left a small comment for you to consider, but feel free to merge!
@@ -345,6 +353,79 @@ public void testStatsOnEviction() throws IOException { | |||
cache.close(); // this triggers some assertions | |||
} | |||
|
|||
public void testSkipCachingFactorAtLeast10() throws Exception { |
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.
Small comment -- to me this test doesn't add much except guard against someone accidentally changing the skip factor. I think it'd accomplish the same to add a code comment like "the skipFactor must be 10 here to match the default in Lucene's LRUQueryCache".
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.
Agreed with Julie's feedback, otherwise LGTM.
@jtibshirani @jpountz Thanks for review. |
…tic#85510) The indices.queries.cache.all_segments setting should not be used in production environments. And we should also use the default skipCachingFactor (i.e, 10) for when that setting is enabled.
…tic#85510) The indices.queries.cache.all_segments setting should not be used in production environments. And we should also use the default skipCachingFactor (i.e, 10) for when that setting is enabled.
…tic#85510) The indices.queries.cache.all_segments setting should not be used in production environments. And we should also use the default skipCachingFactor (i.e, 10) for when that setting is enabled.
…) (#85646) The indices.queries.cache.all_segments setting should not be used in production environments. And we should also use the default skipCachingFactor (i.e, 10) for when that setting is enabled.
…) (#85647) The indices.queries.cache.all_segments setting should not be used in production environments. And we should also use the default skipCachingFactor (i.e, 10) for when that setting is enabled.
…) (#85648) The indices.queries.cache.all_segments setting should not be used in production environments. And we should also use the default skipCachingFactor (i.e, 10) for when that setting is enabled. Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Spin off #85423
The
indices.queries.cache.all_segments
setting should not be used in production environments. And we should also use the defaultskipCachingFactor
(i.e, 10) for LRUQueryCache when that setting is enabled.