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

Prevent index level setting from being configured on a node level #17144

Merged
merged 1 commit into from Mar 17, 2016

Conversation

s1monw
Copy link
Contributor

@s1monw s1monw commented Mar 16, 2016

Today we allow to set all kinds of index level settings on the node level which
is error prone and difficult to get right in a consistent manner.
For instance if some analyzers are setup in a yaml config file some nodes might
not have these analyzers and then index creation fails.

Nevertheless, this change allows some selected settings to be specified on a node level
for instance:

  • index.codec which is used in a hot/cold node architecture and it's value is really per node or per index
  • index.store.fs.fs_lock which is also dependent on the filesystem a node uses

All other index level setting must be specified on the index level. For existing clusters the index must be closed
and all settings must be updated via the API on each of the indices.

Closes #16799

public static final Setting<String> INDEX_CODEC_SETTING = new Setting<>("index.codec", "default", parseCodec("index.codec"),
Property.IndexScope, Property.NodeScope);

private static Function<String, String> parseCodec(String setting) {
Copy link
Member

Choose a reason for hiding this comment

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

Maybe just declare a static method and use a method reference for it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that is really a leftover from refactoring I will move back to waht it was

@rjernst
Copy link
Member

rjernst commented Mar 16, 2016

LGTM

Today we allow to set all kinds of index level settings on the node level which
is error prone and difficult to get right in a consistent manner.
For instance if some analyzers are setup in a yaml config file some nodes might
not have these analyzers and then index creation fails.

Nevertheless, this change allows some selected settings to be specified on a node level
for instance:
 * `index.codec` which is used in a hot/cold node architecture and it's value is really per node or per index
 * `index.store.fs.fs_lock` which is also dependent on the filesystem a node uses

All other index level setting must be specified on the index level. For existing clusters the index must be closed
and all settings must be updated via the API on each of the indices.

Closes elastic#16799
@s1monw s1monw merged commit e91a141 into elastic:master Mar 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Forbid settings index level settings on a node level
3 participants