Skip to content

Suppress merge-on-recovery for older indices - #113462

Merged
elasticsearchmachine merged 2 commits into
elastic:mainfrom
DaveCTurner:2024/09/24/merge-on-recovery-new-indices-only
Sep 24, 2024
Merged

elasticsearchmachine merged 2 commits into
elastic:mainfrom
DaveCTurner:2024/09/24/merge-on-recovery-new-indices-only

Conversation

@DaveCTurner

Copy link
Copy Markdown
Member

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/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 Meta label for distributed team. label Sep 24, 2024
@elasticsearchmachine

Copy link
Copy Markdown
Collaborator

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

@elasticsearchmachine

Copy link
Copy Markdown
Collaborator

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

@DaveCTurner DaveCTurner left a comment

Copy link
Copy Markdown
Member Author

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
Copy Markdown
Member 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.

@henningandersen henningandersen left a comment

Copy link
Copy Markdown
Contributor

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
@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/CRUD A catch all label for issues around indexing, updating and getting a doc by id. Not search. >enhancement Team:Distributed Meta label for distributed team. v9.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants