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

[ILM] rollover + settings.index.priority #36905

Closed
jpcarey opened this issue Dec 20, 2018 · 5 comments · Fixed by #37397
Closed

[ILM] rollover + settings.index.priority #36905

jpcarey opened this issue Dec 20, 2018 · 5 comments · Fixed by #37397
Assignees
Labels
:Data Management/ILM+SLM Index and Snapshot lifecycle management >enhancement

Comments

@jpcarey
Copy link
Contributor

jpcarey commented Dec 20, 2018

Describe the feature: It seems like setting the index.priority on the underlying indices so that the current index (rollover, daily?) would always be prioritized for recovery.

It could be set via the template, but then it needs to be lowered as new indices are created.

https://www.elastic.co/guide/en/elasticsearch/reference/6.5/recovery-prioritization.html

@talevy talevy added >enhancement :Data Management/ILM+SLM Index and Snapshot lifecycle management labels Dec 20, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features

@jakelandis jakelandis self-assigned this Jan 2, 2019
@jakelandis
Copy link
Contributor

@jpcarey - wouldn't the implicit priority for roll over always be the current index ?

From https://elastic.co/guide/en/elasticsearch/reference/6.5/recovery-prioritization.html :

This means that, by default, newer indices will be recovered before older indices.

Can you describe your use case a bit more (or help me understand why the implicit recovery order isn't sufficient).

@jpcarey
Copy link
Contributor Author

jpcarey commented Jan 2, 2019

@jakelandis in the case of multiple rollover indices, you can have different size/document/age requirements for each rollover setup. This means you could have newer rolled over indices from rollover setup "A", vs the current target index setup for rollover "B".

@jakelandis
Copy link
Contributor

Chatted with @jpcarey on this for a bit and the crux of the issues is to help ensure that current index, across all indexes, are prioritized for recovery.

For example, if you have a logs index that rolls every hour, and monitoring index that rolls every day, then you can have ~23 indexes (logs) that are newer than the current writable monitoring index. When recovery happens, those 23 old indexes will get prioritized before the 1 writable monitoring index.

The change here could be to add a high priority to current writable index and remove it when it rolls over or decrease the priority when it rolls over (assuming the the priority is already set). The goal to ensure/enable the ability to allow the current writable indexes that are managed by ILM to recover first.

Proposal:
Add an index_priority option to hot, warm, and cold phases such that when an index enters that phase that priority is assigned to the index.

Thoughts?

@jakelandis
Copy link
Contributor

We discussed this abit and will implement this as a new action available for the hot, warm, and cold phases.

The tentative API will look like this: (where the set_priority will always execute as the first action if multiple actions are defined)

PUT _ilm/policy/my_policy
{
  "policy": {
    "phases": {
      "hot": {
        "actions": {
          "set_priority": {
            "priority": 100
          },
          "rollover": {
            "max_age": "10m"
          }
        }
      },
      "warm": {
        "min_age": "1m",
        "actions": {
          "set_priority": {
            "priority": 90
          }
        }
      }
    }
  }
}

jakelandis added a commit to jakelandis/elasticsearch that referenced this issue Jan 13, 2019
This commit adds a set_priority action to the hot, warm, and cold
phases for an ILM policy. This action sets the `index.priority`
on the managed index to allow different priorities between the
hot, warm, and cold recoveries.

This commit also includes the HLRC and documentation changes.

closes elastic#36905
jakelandis added a commit that referenced this issue Jan 17, 2019
This commit adds a set_priority action to the hot, warm, and cold
phases for an ILM policy. This action sets the `index.priority`
on the managed index to allow different priorities between the
hot, warm, and cold recoveries.

This commit also includes the HLRC and documentation changes.

closes #36905
jakelandis added a commit that referenced this issue Jan 17, 2019
This commit adds a set_priority action to the hot, warm, and cold
phases for an ILM policy. This action sets the `index.priority`
on the managed index to allow different priorities between the
hot, warm, and cold recoveries.

This commit also includes the HLRC and documentation changes.

closes #36905
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/ILM+SLM Index and Snapshot lifecycle management >enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants