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

[Remote Store] Ensure index templates and indices adhere to cluster minimum refresh interval settings #11348

Closed
linuxpi opened this issue Nov 27, 2023 · 0 comments · Fixed by #11340
Assignees
Labels
bug Something isn't working Storage:Durability Issues and PRs related to the durability framework

Comments

@linuxpi
Copy link
Collaborator

linuxpi commented Nov 27, 2023

Index Refresh Interval User Experience

Index Refresh Interval only impacts indexing performance at most. It doesn’t affect Durability or Availability of a cluster. All the flow below are designed taking this into consideration.

Available Controls

Index Level Settings

public static final Setting<TimeValue> INDEX_REFRESH_INTERVAL_SETTING = Setting.timeSetting(
    "index.refresh_interval",
    DEFAULT_REFRESH_INTERVAL,
    MINIMUM_REFRESH_INTERVAL,
    Property.Dynamic,
    Property.IndexScope
);

Cluster Level Settings

public static final Setting<TimeValue> CLUSTER_MINIMUM_INDEX_REFRESH_INTERVAL_SETTING = Setting.timeSetting(
    "cluster.minimum.index.refresh_interval",
    IndexSettings.MINIMUM_REFRESH_INTERVAL,
    IndexSettings.MINIMUM_REFRESH_INTERVAL,
    new ClusterMinimumRefreshIntervalValidator(),
    Property.NodeScope,
    Property.Dynamic
);

public static final Setting<TimeValue> CLUSTER_DEFAULT_INDEX_REFRESH_INTERVAL_SETTING = Setting.timeSetting(
    "cluster.default.index.refresh_interval",
    IndexSettings.DEFAULT_REFRESH_INTERVAL,
    IndexSettings.MINIMUM_REFRESH_INTERVAL,
    new ClusterDefaultRefreshIntervalValidator(),
    Property.NodeScope,
    Property.Dynamic
);

Since index templates can be used to create indices as well, we need to make sure index templates also adheres to minimum refresh interval settings. Below is more detailed view of how different flows behave with cluster minimum refresh interval.

Index Creation With Explicit Refresh Interval

  • Refresh Interval should be not be less than cluster minimum.
  • Already Created Indices will not be updated if cluster minimum changes

Index Creation With Implicit Refresh Interval

  • Cluster Default Refresh Interval will be applicable.
  • Already created indices without explicit refresh interval, will start using the new cluster default refresh interval if cluster default is updated.

Index Template Creation

  • Index Template Creation will not be allowed with refresh interval less than cluster minimum
  • Already existing IndexTemplates wont be updated if cluster minimum is updated. They will continue to create indices with refresh interval specified in the IndexTemplate, even if its less than cluster minimum.

Index Creation via Index Template

  • No Validation will be imposed on an index being created via template. If a template exists with refresh interval less than cluster minimum, we will allow index creation via that template with refresh interval specified in the template.

Index Snapshot Restore

  • Indices being restored via Snapshot will have validation to check if refresh interval is below cluster minimum.

Index Template Snapshot Restore

  • IndexTemplates being restored via Snapshot will have validation to check if refresh interval is below cluster minimum.
@linuxpi linuxpi added bug Something isn't working Storage:Durability Issues and PRs related to the durability framework labels Nov 27, 2023
@linuxpi linuxpi self-assigned this Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Storage:Durability Issues and PRs related to the durability framework
Projects
None yet
2 participants