Skip to content

Move SLM history to data stream#63038

Merged
probakowski merged 5 commits intoelastic:masterfrom
probakowski:slm-history-data-stream
Oct 1, 2020
Merged

Move SLM history to data stream#63038
probakowski merged 5 commits intoelastic:masterfrom
probakowski:slm-history-data-stream

Conversation

@probakowski
Copy link
Copy Markdown
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 DO NOT USE. Use ":StorageEngine/ILM" or ":Distributed Coordination/SLM" instead. 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
Copy Markdown
Collaborator

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

@elasticmachine elasticmachine added the Team:Data Management (obsolete) DO NOT USE. This team no longer exists. label Sep 30, 2020
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 DO NOT USE. Use ":StorageEngine/ILM" or ":Distributed Coordination/SLM" instead. >enhancement Team:Data Management (obsolete) DO NOT USE. This team no longer exists. v7.11.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants