Skip to content

Add sanity check to ReindexDatastreamIndexAction#120231

Merged
parkertimmins merged 2 commits intoelastic:mainfrom
parkertimmins:reindex-datastream-index-sanity-check
Jan 16, 2025
Merged

Add sanity check to ReindexDatastreamIndexAction#120231
parkertimmins merged 2 commits intoelastic:mainfrom
parkertimmins:reindex-datastream-index-sanity-check

Conversation

@parkertimmins
Copy link
Contributor

As a final sanity check after reindexing, check that the number of docs in the source index equals the number of docs in the dest index. Only run this if assertions are enabled since it requires a refresh and two search actions.

@parkertimmins parkertimmins added >enhancement :StorageEngine/Data streams Data streams and their lifecycles auto-backport Automatically create backport pull requests when merged v9.0.0 v8.18.0 labels Jan 15, 2025
@elasticsearchmachine
Copy link
Collaborator

Hi @parkertimmins, I've created a changelog YAML for you.

@parkertimmins parkertimmins marked this pull request as ready for review January 15, 2025 21:00
@elasticsearchmachine elasticsearchmachine added the Team:Data Management (obsolete) DO NOT USE. This team no longer exists. label Jan 15, 2025
@elasticsearchmachine
Copy link
Collaborator

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

@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.x
parkertimmins added a commit to parkertimmins/elasticsearch that referenced this pull request Jan 16, 2025
Add an assert that checks that source and destination index have the same doc count. This requires a refresh of the dest index and a search request against both the source and dest index, so will only be run if asserts are enabled.
elasticsearchmachine pushed a commit that referenced this pull request Jan 16, 2025
…0295)

* Add sanity check to ReindexDatastreamIndexAction (#120231)

Add an assert that checks that source and destination index have the same doc count. This requires a refresh of the dest index and a search request against both the source and dest index, so will only be run if asserts are enabled.

* Compilation error due to lucene totalHits change
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 >enhancement :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