Skip to content
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

Merged
merged 2 commits into from
Oct 22, 2015
Merged

Conversation

s1monw
Copy link
Contributor

@s1monw s1monw commented Oct 16, 2015

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

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);
Copy link
Member

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.

Copy link
Contributor Author

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

Copy link
Member

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.

@nik9000
Copy link
Member

nik9000 commented Oct 19, 2015

You mention that closed indexes consume a significant amount of disk space - but do they use any more disk space than open indexes?

@clintongormley clintongormley added :Data Management/Indices APIs APIs to create and manage indices and templates and removed :Cluster labels Oct 20, 2015
@s1monw
Copy link
Contributor Author

s1monw commented Oct 20, 2015

You mention that closed indexes consume a significant amount of disk space - but do they use any more disk space than open indexes?

no

@nik9000
Copy link
Member

nik9000 commented Oct 20, 2015

LGTM then.

s1monw added a commit that referenced this pull request Oct 22, 2015
Add option to disable closing indices
@s1monw s1monw merged commit 14aaeea into elastic:master Oct 22, 2015
@s1monw s1monw deleted the issues/14168 branch October 22, 2015 18:10
s1monw added a commit that referenced this pull request Oct 22, 2015
Add option to disable closing indices
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants