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
Remove unneeded waits on recovery cancellation #7717
Closed
Closed
Conversation
This file contains 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
When cancelling recoveries, we wait for up to 10s for the source node to be notified before continuing. This is not needed in two cases: 1) The source node has been disconnected due to node shutdown (recovery is canceled as a response to cluster state processing) 2) The current thread is the one that will be notifying the source node (happens when when of the calls from the source nodes discoveres local index is closed) The first one is especially important as it may delay cluster state update processing with 10s.
@@ -634,7 +636,8 @@ private void validateRecoveryStatus(RecoveryStatus onGoingRecovery, ShardId shar | |||
throw new IndexShardClosedException(shardId); | |||
} | |||
if (onGoingRecovery.indexShard.state() == IndexShardState.CLOSED) { | |||
cancelRecovery(onGoingRecovery.indexShard); | |||
// mark sentCanceledToSource after cancel recovery, o.w. cancelRecovery will do nothing |
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.
comment not relevant anymore, right?
LGTM, minor comment |
bleskes
added a commit
that referenced
this pull request
Sep 15, 2014
When cancelling recoveries, we wait for up to 10s for the source node to be notified before continuing. This is not needed in two cases: 1) The source node has been disconnected due to node shutdown (recovery is canceled as a response to cluster state processing) 2) The current thread is the one that will be notifying the source node (happens when one of the calls from the source nodes discoveres the local index is closed) The first one is especially important as it may delay cluster state update processing with 10s. Closes #7717
bleskes
added a commit
that referenced
this pull request
Sep 15, 2014
When cancelling recoveries, we wait for up to 10s for the source node to be notified before continuing. This is not needed in two cases: 1) The source node has been disconnected due to node shutdown (recovery is canceled as a response to cluster state processing) 2) The current thread is the one that will be notifying the source node (happens when one of the calls from the source nodes discoveres the local index is closed) The first one is especially important as it may delay cluster state update processing with 10s. Closes #7717
clintongormley
added
the
:Distributed/Recovery
Anything around constructing a new shard, either from a local or a remote source.
label
Jun 7, 2015
clintongormley
changed the title
Recovery: remove unneeded waits on recovery cancellation
Remove unneeded waits on recovery cancellation
Jun 7, 2015
mute
pushed a commit
to mute/elasticsearch
that referenced
this pull request
Jul 29, 2015
When cancelling recoveries, we wait for up to 10s for the source node to be notified before continuing. This is not needed in two cases: 1) The source node has been disconnected due to node shutdown (recovery is canceled as a response to cluster state processing) 2) The current thread is the one that will be notifying the source node (happens when one of the calls from the source nodes discoveres the local index is closed) The first one is especially important as it may delay cluster state update processing with 10s. Closes elastic#7717
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
:Distributed/Recovery
Anything around constructing a new shard, either from a local or a remote source.
>enhancement
resiliency
v1.4.0.Beta1
v2.0.0-beta1
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.
When cancelling recoveries, we wait for up to 10s for the source node to be notified before continuing. This is not needed in two cases:
The first one is especially important as it may delay cluster state update processing with 10s.