-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Fix SnapshotStatus Transport Action Doing IO on Transport Thread #68023
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
original-brownbear
merged 1 commit into
elastic:master
from
original-brownbear:improve-snapshot-status-api
Jan 28, 2021
Merged
Fix SnapshotStatus Transport Action Doing IO on Transport Thread #68023
original-brownbear
merged 1 commit into
elastic:master
from
original-brownbear:improve-snapshot-status-api
Jan 28, 2021
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There is a small chance here that elastic#67947 would cause the callback for the repository data to run on a transport or CS updater thread and do a lot of IO to fetch `SnapshotInfo`. Fixed by always forking to the generic pool for the callback. Added test that triggers lots of deserializing repository data from cache on the transport thread concurrently which triggers this bug relatively reliable (more than half the runs) but is still reasonably fast (under 5s).
Collaborator
|
Pinging @elastic/es-distributed (Team:Distributed) |
Contributor
Author
fcofdez
approved these changes
Jan 27, 2021
Contributor
fcofdez
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, good catch!
Contributor
Author
|
Thanks Francisco! |
original-brownbear
added a commit
to original-brownbear/elasticsearch
that referenced
this pull request
Jan 28, 2021
…stic#68023) There is a small chance here that elastic#67947 would cause the callback for the repository data to run on a transport or CS updater thread and do a lot of IO to fetch `SnapshotInfo`. Fixed by always forking to the generic pool for the callback. Added test that triggers lots of deserializing repository data from cache on the transport thread concurrently which triggers this bug relatively reliable (more than half the runs) but is still reasonably fast (under 5s).
original-brownbear
added a commit
that referenced
this pull request
Jan 28, 2021
) (#68092) There is a small chance here that #67947 would cause the callback for the repository data to run on a transport or CS updater thread and do a lot of IO to fetch `SnapshotInfo`. Fixed by always forking to the generic pool for the callback. Added test that triggers lots of deserializing repository data from cache on the transport thread concurrently which triggers this bug relatively reliable (more than half the runs) but is still reasonably fast (under 5s).
original-brownbear
added a commit
to original-brownbear/elasticsearch
that referenced
this pull request
Feb 2, 2021
Same as elastic#68023 but even less likely (couldn't really find a quick way to write a test for it for that reason). Fix is the same, fork off to the generic pool for listener handling. Also, this allows removing the forking in the transport action since we don't do any long runnning work on the calling thread any longer in the restore method.
original-brownbear
added a commit
that referenced
this pull request
Feb 3, 2021
Same as #68023 but even less likely (couldn't really find a quick way to write a test for it for that reason). Fix is the same, fork off to the generic pool for listener handling. Also, this allows removing the forking in the transport action since we don't do any long runnning work on the calling thread any longer in the restore method.
original-brownbear
added a commit
to original-brownbear/elasticsearch
that referenced
this pull request
Feb 3, 2021
Same as elastic#68023 but even less likely (couldn't really find a quick way to write a test for it for that reason). Fix is the same, fork off to the generic pool for listener handling. Also, this allows removing the forking in the transport action since we don't do any long runnning work on the calling thread any longer in the restore method.
original-brownbear
added a commit
that referenced
this pull request
Feb 3, 2021
Same as #68023 but even less likely (couldn't really find a quick way to write a test for it for that reason). Fix is the same, fork off to the generic pool for listener handling. Also, this allows removing the forking in the transport action since we don't do any long runnning work on the calling thread any longer in the restore method.
original-brownbear
added a commit
to original-brownbear/elasticsearch
that referenced
this pull request
May 18, 2021
The callback to loading the repository-data may not run on generic in the uncached case because of the repo data deduplication logic. The same issue was fixed for the snapshot status API in elastic#68023
original-brownbear
added a commit
to original-brownbear/elasticsearch
that referenced
this pull request
Jun 29, 2021
…elastic#73196) The callback to loading the repository-data may not run on generic in the uncached case because of the repo data deduplication logic. The same issue was fixed for the snapshot status API in elastic#68023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
:Distributed Coordination/Snapshot/Restore
Anything directly related to the `_snapshot/*` APIs
>non-issue
Team:Distributed (Obsolete)
Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination.
v7.12.0
v8.0.0-alpha1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There is a small chance here that #67947 would cause the callback
for the repository data to run on a transport or CS updater thread
and do a lot of IO to fetch
SnapshotInfo.Fixed by always forking to the generic pool for the callback.
Added test that triggers lots of deserializing repository data from
cache on the transport thread concurrently which triggers this bug
relatively reliable (more than half the runs) but is still reasonably
fast (under 5s).