Skip to content

Connecting the reindex data stream persistent task to ReindexDataStreamIndexAction#118978

Merged
masseyke merged 6 commits intoelastic:mainfrom
masseyke:data-stream-reindex-wired-up
Dec 18, 2024
Merged

Connecting the reindex data stream persistent task to ReindexDataStreamIndexAction#118978
masseyke merged 6 commits intoelastic:mainfrom
masseyke:data-stream-reindex-wired-up

Conversation

@masseyke
Copy link
Member

This connects the reindex data streams task introduced in #116780 with the actual reindexing logic introduced in #116996. For now, it restricts the task to reindexing a single index at a time, but future work will make this configurable.

@masseyke masseyke added >non-issue :StorageEngine/Data streams Data streams and their lifecycles auto-backport Automatically create backport pull requests when merged v9.0.0 v8.18.0 labels Dec 18, 2024
@elasticsearchmachine elasticsearchmachine added the Team:Data Management (obsolete) DO NOT USE. This team no longer exists. label Dec 18, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

List<Index> indices = dataStream.getIndices();
List<Index> indicesToBeReindexed = indices.stream()
.filter(getOldIndexVersionPredicate(clusterService.state().metadata()))
.filter(index -> index.getName().equals(dataStream.getWriteIndex().getName()) == false)
Copy link
Contributor

Choose a reason for hiding this comment

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

Won't this be redundant after the rollover? I though the write index would have a newer version by this point? Maybe this could be an assert instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh I think you're right, and that's just some placeholder code I had in before I added the rollover step. I'll remove that filter.

Copy link
Contributor

@parkertimmins parkertimmins left a comment

Choose a reason for hiding this comment

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

Just one small question, otherwise looks good

@masseyke masseyke merged commit e087f3d into elastic:main Dec 18, 2024
@masseyke masseyke deleted the data-stream-reindex-wired-up branch December 18, 2024 21:43
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
8.x Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 118978

masseyke added a commit to masseyke/elasticsearch that referenced this pull request Dec 18, 2024
elasticsearchmachine pushed a commit that referenced this pull request Dec 19, 2024
…amIndexAction (#118978) (#119032)

* Connecting the reindex data stream persistent task to ReindexDataStreamIndexAction (#118978)

* removing java 21 syntax

* [CI] Auto commit changes from spotless

* removing java 21 syntax

* removing code that doesnt work in 7.17

* expecting no upgrades in clusters of the same major versoin

* correcting method name after merge

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged >non-issue :StorageEngine/Data streams Data streams and their lifecycles Team:Data Management (obsolete) DO NOT USE. This team no longer exists. v8.18.0 v9.0.0

3 participants