Make recovery source partially non-blocking#37291
Merged
dnhatn merged 14 commits intoelastic:masterfrom Jan 12, 2019
Merged
Conversation
Today a peer-recovery may run into a deadlock if the value of `node_concurrent_recoveries` is too high. This happens because the peer-recovery is executed in a blocking fashion. This commit attempts to make the recovery source partially non-blocking. I will make three follow-ups to make it fully non-blocking: (1) send translog operations, (2) primary relocation, (3) send commit files.
Collaborator
|
Pinging @elastic/es-distributed |
s1monw
suggested changes
Jan 10, 2019
Contributor
s1monw
left a comment
There was a problem hiding this comment.
did a first pass. I would love to minimize the steps we make async in this PR even further.
server/src/main/java/org/elasticsearch/indices/recovery/PeerRecoverySourceService.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/indices/recovery/PeerRecoverySourceService.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/indices/recovery/PeerRecoverySourceService.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/indices/recovery/RecoveryTarget.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/indices/recovery/RecoveryTarget.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/indices/recovery/RemoteRecoveryTargetHandler.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/indices/recovery/RecoverySourceHandler.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/indices/recovery/RecoverySourceHandler.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/indices/recovery/RecoverySourceHandler.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/indices/recovery/RecoverySourceHandler.java
Outdated
Show resolved
Hide resolved
This was referenced Jan 10, 2019
Member
Author
|
@s1monw Thanks for looking. I've minimized changes in this PR - just try to provide the infra for the next steps. Would you please take another look? |
Member
Author
|
@elasticmachine run gradle build tests 1 |
dnhatn
added a commit
that referenced
this pull request
Jan 11, 2019
s1monw
suggested changes
Jan 11, 2019
server/src/main/java/org/elasticsearch/indices/recovery/PeerRecoverySourceService.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/indices/recovery/PeerRecoverySourceService.java
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/indices/recovery/RecoverySourceHandler.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/indices/recovery/RecoverySourceHandler.java
Outdated
Show resolved
Hide resolved
Member
Author
|
@s1monw I pushed changes. Can you have another look? |
dnhatn
added a commit
that referenced
this pull request
Jan 11, 2019
This commit introduces StepListener which provides a simple way to write a flow consisting of multiple asynchronous steps without having nested callbacks. Relates #37291
dnhatn
added a commit
that referenced
this pull request
Jan 12, 2019
dnhatn
added a commit
that referenced
this pull request
Jan 12, 2019
This commit introduces StepListener which provides a simple way to write a flow consisting of multiple asynchronous steps without having nested callbacks. Relates #37291
s1monw
approved these changes
Jan 12, 2019
server/src/main/java/org/elasticsearch/common/util/CancellableThreads.java
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/indices/recovery/RecoverySourceHandler.java
Outdated
Show resolved
Hide resolved
Member
Author
|
Thanks @s1monw. |
dnhatn
added a commit
to dnhatn/elasticsearch
that referenced
this pull request
Jan 12, 2019
dnhatn
added a commit
that referenced
this pull request
Jan 13, 2019
Today a peer-recovery may run into a deadlock if the value of node_concurrent_recoveries is too high. This happens because the peer-recovery is executed in a blocking fashion. This commit attempts to make the recovery source partially non-blocking. I will make three follow-ups to make it fully non-blocking: (1) send translog operations, (2) primary relocation, (3) send commit files. Relates #36195
dnhatn
added a commit
that referenced
this pull request
Jan 14, 2019
dnhatn
added a commit
that referenced
this pull request
Jan 15, 2019
dnhatn
added a commit
that referenced
this pull request
Jan 15, 2019
This commit prepares the required infra to make send a translog snapshot of the recovery source non-blocking. I'll make a follow-up to make the send snapshot method non-blocking. Relates #37291
dnhatn
added a commit
that referenced
this pull request
Jan 23, 2019
This commit prepares the required infra to make send a translog snapshot of the recovery source non-blocking. I'll make a follow-up to make the send snapshot method non-blocking. Relates #37291
kovrus
added a commit
to crate/crate
that referenced
this pull request
Sep 11, 2019
kovrus
added a commit
to crate/crate
that referenced
this pull request
Sep 11, 2019
kovrus
added a commit
to crate/crate
that referenced
this pull request
Sep 12, 2019
kovrus
added a commit
to crate/crate
that referenced
this pull request
Sep 12, 2019
kovrus
added a commit
to crate/crate
that referenced
this pull request
Sep 12, 2019
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Today a peer-recovery may run into a deadlock if the value of
node_concurrent_recoveriesis too high. This happens because thepeer-recovery is executed in a blocking fashion. This commit attempts to
make the recovery source partially non-blocking. I will make three
follow-ups to make it fully non-blocking: (1) send translog operations,
(2) primary relocation, (3) send commit files.
Relates #36195