Skip to content
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

[RECOVERY] Make recovery delay configurable #8739

Merged
merged 1 commit into from
Dec 2, 2014

Conversation

s1monw
Copy link
Contributor

@s1monw s1monw commented Dec 2, 2014

Today we wait 500ms before we retry a recovery if the target node is not ready.
This happens if the source starts the recovery before the target has
processed the clusterstate moving the target shard into the right state.
This can cause a 500ms delay each time it happens while the shard is ready
way earlier on the target node. This commit makes this delay configurable
to mainly speed up test processing and shard allocation in tests.

@s1monw s1monw added >test Issues or PRs that are addressing/adding tests review v2.0.0-beta1 v1.5.0 labels Dec 2, 2014
@@ -303,10 +303,12 @@ public InternalTestCluster(long clusterSeed,
builder.put(RecoverySettings.INDICES_RECOVERY_CONCURRENT_STREAMS, RandomInts.randomIntBetween(random, 10, 15));
builder.put(RecoverySettings.INDICES_RECOVERY_CONCURRENT_SMALL_FILE_STREAMS, RandomInts.randomIntBetween(random, 10, 15));
builder.put(ThrottlingAllocationDecider.CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_RECOVERIES, RandomInts.randomIntBetween(random, 5, 10));
builder.put(RecoverySettings.INDICES_RECOVERY_RETRY_DELAY, TimeValue.timeValueMillis(RandomInts.randomIntBetween(random, 10, 50))); // more shareds - we need to retry more often
Copy link
Contributor

Choose a reason for hiding this comment

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

little typo - shareds

@bleskes
Copy link
Contributor

bleskes commented Dec 2, 2014

LGTM - note that I had added a similar settings in https://github.com/elasticsearch/elasticsearch/pull/8720/files#diff-d1e7cc297312b15bab61e9467d3d0cd7R78 , but i needed more control over different reasons to retry. I like the fact that is' in RecoverySettings now and dynamically updatable. I'll update my PR when rebasing.

Today we wait 500ms before we retry a recovery if the target node is not ready.
This happens if the source starts the recovery before the target has
processed the clusterstate moving the target shard into the right state.
This can cause a 500ms delay each time it happens while the shard is ready
way earlier on the target node. This commit makes this delay configurable
to mainly speed up test processing and shard allocation in tests.
@s1monw s1monw merged commit c1edcaf into elastic:master Dec 2, 2014
@s1monw s1monw deleted the retry_delay branch December 2, 2014 12:36
@clintongormley clintongormley added :Distributed/Recovery Anything around constructing a new shard, either from a local or a remote source. and removed review labels Mar 19, 2015
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. >test Issues or PRs that are addressing/adding tests v1.5.0 v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants