-
Notifications
You must be signed in to change notification settings - Fork 25.3k
Scripting: Deprecate general cache settings #55038
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
Scripting: Deprecate general cache settings #55038
Conversation
…152-painless-limit-per-context__05__deprecate
…152-painless-limit-per-context__05__deprecate
…152-painless-limit-per-context__05__deprecate
Pinging @elastic/es-core-infra (:Core/Infra/Scripting) |
…ns_rate=true in docker compose
*/ | ||
void updateContextSettings(Settings settings, ScriptContext<?> context) { | ||
void set(String name, ScriptCache context) { |
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.
Rename to cache
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.
Thank you for the walkthrough. This looks good to me. Please also have @rjernst review as he's more familiar with the testing framework.
static class CacheHolder { | ||
final ScriptCache general; | ||
final Map<String, AtomicReference<ScriptCache>> contextCache; | ||
void setCacheHolder(Settings settings, AtomicReference<CacheHolder> cacheHolder) { |
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.
Make this package protected.
…152-painless-limit-per-context__05__deprecate
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.
Docs LGTM.
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 after #55560 is merged.
@elasticmachine run elasticsearch-ci/2 |
* Test: don't modify defaultConfig on upgrade
Deprecate and remove as fallback settings:
script.cache.max_size
in favor ofscript.context.$CONTEXT.cache_max_size
script.cache.expire
in favor ofscript.context.$CONTEXT.cache_expire
script.max_compilations_rate
in favor ofscript.context.$CONTEXT.max_compilations_rate
Default to context cache.
Add
script.disable_max_compilations_rate
, defaultfalse
to totally disable compilation rates. This setting is intended for integration tests.Refs: #50152