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 SLM history to data stream #63038

Merged
merged 5 commits into from
Oct 1, 2020

Conversation

probakowski
Copy link
Contributor

This change converts SLM history index to data stream.
Consequence of this is name change as name of data stream can't start with .. New name for SLM history data stream will be slm-history-4 (retaining version in the name).

@probakowski probakowski added :Data Management/ILM+SLM Index and Snapshot lifecycle management v7.10.0 v8.0.0 labels Sep 30, 2020
@probakowski probakowski marked this pull request as ready for review September 30, 2020 11:27
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features (:Core/Features/ILM+SLM)

@elasticmachine elasticmachine added the Team:Data Management Meta label for data/management team label Sep 30, 2020
Copy link
Member

@dakrone dakrone left a comment

Choose a reason for hiding this comment

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

LGTM, I left one super minor comment, thanks Przemko!

Metadata metadata = clusterService.state().getMetadata();
if (metadata.dataStreams().containsKey(SLM_HISTORY_DATA_STREAM) == false &&
metadata.templatesV2().containsKey(SLM_TEMPLATE_NAME) == false) {
logger.error(new ParameterizedMessage("failed to index snapshot history item in index [{}]: [{}]",
Copy link
Member

Choose a reason for hiding this comment

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

I think this should be a bit more descriptive about why it failed (such as mentioning that the data stream and template were missing) since we don't have an exception in this case

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right, I reworded error message

@probakowski probakowski merged commit a3dd08e into elastic:master Oct 1, 2020
@probakowski probakowski deleted the slm-history-data-stream branch October 1, 2020 11:35
probakowski added a commit to probakowski/elasticsearch that referenced this pull request Oct 1, 2020
This change converts SLM history index to data stream.
Consequence of this is name change as name of data stream can't start with .. New name for SLM history data stream will be slm-history-4 (retaining version in the name).
# Conflicts:
#	x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/slm/history/SnapshotHistoryStore.java
#	x-pack/plugin/ilm/src/internalClusterTest/java/org/elasticsearch/xpack/slm/SLMSnapshotBlockingIntegTests.java
probakowski added a commit that referenced this pull request Nov 2, 2020
* Move SLM history to data stream (#63038)

This change converts SLM history index to data stream.
Consequence of this is name change as name of data stream can't start with .. New name for SLM history data stream will be slm-history-4 (retaining version in the name).
# Conflicts:
#	x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/slm/history/SnapshotHistoryStore.java
#	x-pack/plugin/ilm/src/internalClusterTest/java/org/elasticsearch/xpack/slm/SLMSnapshotBlockingIntegTests.java

* fix compilation

* Move SLM history back to hidden .slm-history (#64210)

This change moves SLM history back to .slm-history pattern (with dot) and makes it hidden as we have hidden data streams now.

* fix checkstyle
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 Team:Data Management Meta label for data/management team v7.11.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants