Skip to content

Avoid capturing SnapshotsInProgress$Entry in queue #88726

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

DaveCTurner
Copy link
Contributor

Today each time there's shards to snapshot we enqueue a lambda which
captures the current SnapshotsInProgress$Entry. This is a pretty
heavyweight object, possibly several MB in size, most of which is not
necessary to capture, and with concurrent snapshots across thousands of
shards we may enqueue many hundreds of slightly different such objects.
With this commit we compute a more efficient representation of the work
to be done by each task in the queue instead.

Relates #77466
Backport of #88707

Today each time there's shards to snapshot we enqueue a lambda which
captures the current `SnapshotsInProgress$Entry`. This is a pretty
heavyweight object, possibly several MB in size, most of which is not
necessary to capture, and with concurrent snapshots across thousands of
shards we may enqueue many hundreds of slightly different such objects.
With this commit we compute a more efficient representation of the work
to be done by each task in the queue instead.

Relates elastic#77466
Backport of elastic#88707
@DaveCTurner DaveCTurner added :Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs backport auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) v7.17.6 labels Jul 22, 2022
@elasticsearchmachine elasticsearchmachine merged commit b3eb52d into elastic:7.17 Jul 22, 2022
@DaveCTurner DaveCTurner deleted the 2022-07-22-backport-88707-7.17 branch July 22, 2022 13:39
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!) backport :Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs v7.17.6
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants