Skip to content

Conversation

DaveCTurner
Copy link
Contributor

There may be many older indices in need of merging, but today we do not
throttle this work across shards so an upgrade could lead to an
overwhelming spike in merges. With this commit we make it so that the
automatic merge-on-recovery behaviour only applies to newly-created
indices.

There may be many older indices in need of merging, but today we do not throttle this work across shards so an upgrade could lead to an overwhelming spike in merges. With this commit we make it so that the automatic merge-on-recovery behaviour only applies to newly-created indices.
@DaveCTurner DaveCTurner added >enhancement :Distributed Indexing/CRUD A catch all label for issues around indexing, updating and getting a doc by id. Not search. v9.0.0 labels Sep 24, 2024
@elasticsearchmachine elasticsearchmachine added the Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. label Sep 24, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

@elasticsearchmachine
Copy link
Collaborator

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

Copy link
Contributor Author

@DaveCTurner DaveCTurner left a comment

Choose a reason for hiding this comment

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

I'll backport the IndexVersions change, but nothing else, to 8.16.


static {
final var propertyValue = System.getProperty("es.trigger_merge_after_recovery");
final var propertyValue = System.getProperty("es.trigger_merge_after_recovery_8_515_00_0");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renaming the kill-switch here to nullify the overrides that are in place today and automatically re-enable this feature when upgrading. We can rename it back again later.

Copy link
Contributor

@henningandersen henningandersen left a comment

Choose a reason for hiding this comment

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

LGTM.

@DaveCTurner DaveCTurner added the auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) label Sep 24, 2024
@elasticsearchmachine elasticsearchmachine merged commit 6071362 into elastic:main Sep 24, 2024
15 checks passed
@DaveCTurner DaveCTurner deleted the 2024/09/24/merge-on-recovery-new-indices-only branch September 24, 2024 14:47
DaveCTurner added a commit to DaveCTurner/elasticsearch that referenced this pull request Sep 24, 2024
Most of elastic#113462 only applies to `main`, but for now we must keep the index versions aligned in `8.x`. This commit backports the new `IndexVersion` constant.
elasticsearchmachine pushed a commit that referenced this pull request Sep 24, 2024
Most of #113462 only applies to `main`, but for now we must keep the index versions aligned in `8.x`. This commit backports the new `IndexVersion` constant.
DaveCTurner added a commit to DaveCTurner/elasticsearch that referenced this pull request Feb 7, 2025
In elastic#113462 we introduced a version bound on post-recovery merges to avoid a spike of merge activity after an upgrade. At the time there was no `IndexVersion` unique to the 9.x series, but we have such a version now, so this commit properly restricts post-recovery merges to only apply to indices created by versions that support them. Relates ES-9620
elasticsearchmachine pushed a commit that referenced this pull request Feb 18, 2025
In #113462 we introduced a version bound on post-recovery merges to avoid a spike of merge activity after an upgrade. At the time there was no `IndexVersion` unique to the 9.x series, but we have such a version now, so this commit properly restricts post-recovery merges to only apply to indices created by versions that support them. Relates ES-9620
DaveCTurner added a commit to DaveCTurner/elasticsearch that referenced this pull request Feb 18, 2025
In elastic#113462 we introduced a version bound on post-recovery merges to avoid a spike of merge activity after an upgrade. At the time there was no `IndexVersion` unique to the 9.x series, but we have such a version now, so this commit properly restricts post-recovery merges to only apply to indices created by versions that support them. Relates ES-9620
elasticsearchmachine pushed a commit that referenced this pull request Feb 18, 2025
In #113462 we introduced a version bound on post-recovery merges to avoid a spike of merge activity after an upgrade. At the time there was no `IndexVersion` unique to the 9.x series, but we have such a version now, so this commit properly restricts post-recovery merges to only apply to indices created by versions that support them. Relates ES-9620
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) :Distributed Indexing/CRUD A catch all label for issues around indexing, updating and getting a doc by id. Not search. >enhancement Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. v9.0.0

3 participants