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

Move all dynamic settings and their config classes to the index level #15955

Merged
merged 1 commit into from Jan 13, 2016

Conversation

s1monw
Copy link
Contributor

@s1monw s1monw commented Jan 13, 2016

Today we maintain a lot of settings on the shard level which are all index level settings.
In order to cut over to the new settings API where we register update listener we have to move
all of them on to the index level otherwise we need a way to un-register listeners which is error-prone
and requires additional handling when shards are closed. It's simpler and also more accurate to handle all of
them on the index level where we can trash the entire registry for update listener once the index goes out of scope.

Related to #6732

Today we maintain a lot of settings on the shard level which are all index level settings.
In order to cut over to the new settings API where we register update listener we have to move
all of them on to the index level otherwise we need a way to un-register listeners which is error-prone
and requires additional handling when shards are closed. It's simpler and also more accurate to handle all of
them on the index level where we can trash the entire registry for update listener once the index goes out of scope.
@mikemccand
Copy link
Contributor

LGTM

* Index setting to control if a flush is executed before engine is closed
* This setting is realtime updateable.
*/
public static final String INDEX_FLUSH_ON_CLOSE = "index.flush_on_close";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would a user set this setting to false ? It's not taken into account when the shard is closed due to relocations or when the index is removed so is it useful to have it as an updatable index setting ? IMO this could be a chance to remove the setting and force the value to true.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like keeping changes like this purely mechanical though. If we should remove the setting we can remove it after I think.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure I was just wondering if there is a use case for this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we use this setting mainly in tests but I might be able to work around that. it totally doesn't need to be updateable. I will do this in a followup

@nik9000
Copy link
Member

nik9000 commented Jan 13, 2016

LGTM. @jimferenczi has a point about maybe removing INDEX_FLUSH_ON_CLOSE, probably worth its own issue. Left a silly comment about naming that can come later/never.

s1monw added a commit that referenced this pull request Jan 13, 2016
Move all dynamic settings and their config classes to the index level
@s1monw s1monw merged commit b333133 into elastic:master Jan 13, 2016
s1monw added a commit to s1monw/elasticsearch that referenced this pull request Jan 13, 2016
`index.flush_on_close` is a test setting and doesn't need to be updateable.

Relates to elastic#15955
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.

None yet

4 participants