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: parse origination date from index name (#46755) #47124

Merged

Conversation

andreidan
Copy link
Contributor

  • ILM: parse origination date from index name

Introduce the index.lifecycle.parse_origination_date setting that
indicates if the origination date should be parsed from the index name.
If set to true an index which doesn't match the expected format (namely
indexName-{dateFormat}-optional_digits will fail before being created.
The origination date will be parsed when initialising a lifecycle for an
index and it will be set as the index.lifecycle.origination_date for
that index.

A user set value for index.lifecycle.origination_date will always
override a possible parsable date from the index name.

(cherry picked from commit c363d27)
Signed-off-by: Andrei Dan andrei.dan@elastic.co

Backport of #46755

  • Have you signed the contributor license agreement?
  • Have you followed the contributor guidelines?
  • If submitting code, have you built your formula locally prior to submission with gradle check?
  • If submitting code, is your pull request against master? Unless there is a good reason otherwise, we prefer pull requests against master and will backport as needed.
  • If submitting code, have you checked that your submission is for an OS and architecture that we support?
  • If you are submitting this code for a class then read our policy for that.

* ILM: parse origination date from index name

Introduce the `index.lifecycle.parse_origination_date` setting that
indicates if the origination date should be parsed from the index name.
If set to true an index which doesn't match the expected format (namely
`indexName-{dateFormat}-optional_digits` will fail before being created.
The origination date will be parsed when initialising a lifecycle for an
index and it will be set as the `index.lifecycle.origination_date` for
that index.

A user set value for `index.lifecycle.origination_date` will always
override a possible parsable date from the index name.

(cherry picked from commit c363d27)
Signed-off-by: Andrei Dan <andrei.dan@elastic.co>
@andreidan
Copy link
Contributor Author

@dakrone I added a commit on this backport as didn't realise 7x still runs on java 8 and a test used Map.of which is not available until java 9

9f854e1

@dakrone
Copy link
Member

dakrone commented Sep 25, 2019

I added a commit on this backport as didn't realise 7x still runs on java 8 and a test used Map.of which is not available until java 9

No problem, we sometimes have to make minor changes during backports. This should be fine assuming CI is happy.

@andreidan andreidan merged commit 27520ca into elastic:7.x Sep 25, 2019
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.

None yet

2 participants