-
Notifications
You must be signed in to change notification settings - Fork 24.6k
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
Add option to disable closing indices #14169
Conversation
Closed indices are currently out of scope for snapshots and shard migration, and can cause issues in managed environments – where closing an index does not necessarily make sense, as it still consumes the managed environment's storage quota. This commit adds an option to dynamically disable closing indices via node or cluster settings. Closes elastic#14168
|
||
@Override | ||
public void onRefreshSettings(Settings settings) { | ||
final boolean enable = settings.getAsBoolean(SETTING_CLUSTER_INDICES_CLOSE_ENABLE, this.closeIndexEnabled); |
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.
Should this be
+ final boolean enable = settings.getAsBoolean(SETTING_CLUSTER_INDICES_CLOSE_ENABLE, true);
?
Settings can't really be cleared right now but if they could be this would stick the value to whatever it was set at before clearing. Maybe it doesn't matter but I'm certainly more used to seeing the default value here.
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 pattern is used all over the place in es
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.
I see it. I was just confused. Objection withdrawn.
You mention that closed indexes consume a significant amount of disk space - but do they use any more disk space than open indexes? |
no |
LGTM then. |
Add option to disable closing indices
Add option to disable closing indices
Closed indices are currently out of scope for snapshots and shard migration,
and can cause issues in managed environments – where closing an index does
not necessarily make sense, as it still consumes the managed environment's storage quota.
This commit adds an option to dynamically disable closing indices via node or cluster settings.
Closes #14168