Add timeout for ccr recovery action#37840
Merged
Tim-Brooks merged 14 commits intoelastic:masterfrom Jan 29, 2019
Merged
Conversation
This is related to elastic#35975. It adds a action timeout setting that allows timeouts to be applied to the individual transport actions that are used during a ccr recovery.
Collaborator
|
Pinging @elastic/es-distributed |
32 tasks
Contributor
Author
|
ywelsch
reviewed
Jan 25, 2019
Contributor
ywelsch
left a comment
There was a problem hiding this comment.
Code and default value looks good (we can always increase it later if we see the need for it). For testing, you could set a low timeout, and then inject a failure at an arbitrary point (i.e. randomly on one of the CCR recovery actions) using MockTransportService, see RecoveryActionBlocker as an example in IndexRecoveryIT, and then check that the restore fails in a timely fashion.
ywelsch
approved these changes
Jan 28, 2019
| settingsRequest = new ClusterUpdateSettingsRequest(); | ||
| TimeValue defaultValue = CcrSettings.INDICES_RECOVERY_ACTION_TIMEOUT_SETTING.getDefault(Settings.EMPTY); | ||
| settingsRequest.persistentSettings(Settings.builder().put(CcrSettings.INDICES_RECOVERY_ACTION_TIMEOUT_SETTING.getKey(), | ||
| defaultValue)); |
Contributor
There was a problem hiding this comment.
setting it to null also resets to the default
|
|
||
| public void testIndividualActionsTimeout() throws Exception { | ||
| ClusterUpdateSettingsRequest settingsRequest = new ClusterUpdateSettingsRequest(); | ||
| TimeValue timeValue = new TimeValue(100); |
Contributor
There was a problem hiding this comment.
I prefer TimeValue.timeValueMillis(100). It's clearer what the 100 are.
Contributor
Author
|
@elasticmachine run elasticsearch-ci/2 |
Tim-Brooks
added a commit
to Tim-Brooks/elasticsearch
that referenced
this pull request
Jan 30, 2019
This is related to elastic#35975. It adds a action timeout setting that allows timeouts to be applied to the individual transport actions that are used during a ccr recovery.
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.
This is related to #35975. It adds a action timeout setting that allows
timeouts to be applied to the individual transport actions that are
used during a ccr recovery.