Skip to content

More Efficient Snapshot State Handling#56669

Merged
original-brownbear merged 1 commit intoelastic:masterfrom
original-brownbear:more-efficient-snapshot-finalization
May 15, 2020
Merged

More Efficient Snapshot State Handling#56669
original-brownbear merged 1 commit intoelastic:masterfrom
original-brownbear:more-efficient-snapshot-finalization

Conversation

@original-brownbear
Copy link
Copy Markdown
Contributor

Follow up to #56365. Instead of redundantly checking snapshots for completion
over and over, just track the completed snapshots in the CS updates that complete
them instead of looping over the smae snapshot entries over and over.
Also, in the batched snapshot shard status updates, only check for completion
of a snapshot entry if it isn't already finalizing.

Follow up to #56365. Instead of redundantly checking snapshots for completion
over and over, just track the completed snapshots in the CS updates that complete
them instead of looping over the smae snapshot entries over and over.
Also, in the batched snapshot shard status updates, only check for completion
of a snapshot entry if it isn't already finalizing.
@original-brownbear original-brownbear added >non-issue :Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs v8.0.0 v7.9.0 labels May 13, 2020
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-distributed (:Distributed/Snapshot/Restore)

@elasticmachine elasticmachine added the Team:Distributed Meta label for distributed team. label May 13, 2020
try {
listener.onResponse(new UpdateIndexShardSnapshotStatusResponse());
} finally {
endCompletedSnapshots(newState);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This saves a ton of cycles. Just think about a 10k shards snapshot. Worst case that would have triggered ~10k ^ 2 checks on whether all shards have completed if the last snapshot update ...

@original-brownbear original-brownbear requested a review from tlrx May 13, 2020 09:21
Copy link
Copy Markdown
Member

@tlrx tlrx left a comment

Choose a reason for hiding this comment

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

LGTM

@original-brownbear
Copy link
Copy Markdown
Contributor Author

Thanks Tanguy!

@original-brownbear original-brownbear merged commit 500a726 into elastic:master May 15, 2020
@original-brownbear original-brownbear deleted the more-efficient-snapshot-finalization branch May 15, 2020 17:34
@mfussenegger mfussenegger mentioned this pull request May 22, 2020
37 tasks
original-brownbear added a commit that referenced this pull request Jul 13, 2020
Follow up to #56365. Instead of redundantly checking snapshots for completion
over and over, just track the completed snapshots in the CS updates that complete
them instead of looping over the smae snapshot entries over and over.
Also, in the batched snapshot shard status updates, only check for completion
of a snapshot entry if it isn't already finalizing.
@original-brownbear original-brownbear restored the more-efficient-snapshot-finalization branch August 6, 2020 18:23
@original-brownbear original-brownbear deleted the more-efficient-snapshot-finalization branch September 3, 2020 21:56
@original-brownbear original-brownbear restored the more-efficient-snapshot-finalization branch December 6, 2020 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs >non-issue Team:Distributed Meta label for distributed team. v7.9.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants