We have to set the recovery setting to `0` if we don't want throttling from recoveries. Otherwise the randomized value used for this setting in tests can lead to throttling unexpectedly. Closes #61311
This commit is contained in:
parent
70128e022b
commit
4a53ae203e
|
@ -1726,10 +1726,9 @@ public class SharedClusterSnapshotRestoreIT extends AbstractSnapshotIntegTestCas
|
|||
cluster().wipeIndices("test-idx");
|
||||
|
||||
logger.info("--> restore index");
|
||||
if (throttleRestoreViaRecoverySettings) {
|
||||
client.admin().cluster().prepareUpdateSettings().setTransientSettings(Settings.builder()
|
||||
.put(INDICES_RECOVERY_MAX_BYTES_PER_SEC_SETTING.getKey(), "10k").build()).get();
|
||||
}
|
||||
client.admin().cluster().prepareUpdateSettings().setTransientSettings(Settings.builder()
|
||||
.put(INDICES_RECOVERY_MAX_BYTES_PER_SEC_SETTING.getKey(),
|
||||
throttleRestoreViaRecoverySettings ? "10k" : "0").build()).get();
|
||||
RestoreSnapshotResponse restoreSnapshotResponse = client.admin().cluster().prepareRestoreSnapshot("test-repo", "test-snap")
|
||||
.setWaitForCompletion(true).execute().actionGet();
|
||||
assertThat(restoreSnapshotResponse.getRestoreInfo().totalShards(), greaterThan(0));
|
||||
|
|
Loading…
Reference in New Issue