-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CCR recoveries using wrong setting for chunk sizes (#59597)
The default chunk size for CCR file-based recoveries was wrongly set to 40MB instead of 1MB.
- Loading branch information
Showing
3 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
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
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
32 changes: 32 additions & 0 deletions
32
x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/CcrSettingsTests.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
package org.elasticsearch.xpack.ccr; | ||
|
||
import org.elasticsearch.common.settings.ClusterSettings; | ||
import org.elasticsearch.common.settings.Settings; | ||
import org.elasticsearch.common.util.set.Sets; | ||
import org.elasticsearch.test.ESTestCase; | ||
|
||
public class CcrSettingsTests extends ESTestCase { | ||
|
||
public void testDefaultSettings() { | ||
final Settings settings = Settings.EMPTY; | ||
final CcrSettings ccrSettings = new CcrSettings(settings, | ||
new ClusterSettings(settings, Sets.newHashSet(CcrSettings.RECOVERY_CHUNK_SIZE, | ||
CcrSettings.RECOVERY_MAX_BYTES_PER_SECOND, CcrSettings.INDICES_RECOVERY_MAX_CONCURRENT_FILE_CHUNKS_SETTING, | ||
CcrSettings.INDICES_RECOVERY_ACTIVITY_TIMEOUT_SETTING, CcrSettings.INDICES_RECOVERY_ACTION_TIMEOUT_SETTING))); | ||
assertEquals(CcrSettings.RECOVERY_CHUNK_SIZE.get(settings), ccrSettings.getChunkSize()); | ||
assertEquals(CcrSettings.INDICES_RECOVERY_MAX_CONCURRENT_FILE_CHUNKS_SETTING.get(settings).intValue(), | ||
ccrSettings.getMaxConcurrentFileChunks()); | ||
assertEquals(CcrSettings.INDICES_RECOVERY_ACTIVITY_TIMEOUT_SETTING.get(settings), | ||
ccrSettings.getRecoveryActivityTimeout()); | ||
assertEquals(CcrSettings.INDICES_RECOVERY_ACTION_TIMEOUT_SETTING.get(settings), | ||
ccrSettings.getRecoveryActionTimeout()); | ||
assertEquals(CcrSettings.RECOVERY_MAX_BYTES_PER_SECOND.get(settings).getMbFrac(), | ||
ccrSettings.getRateLimiter().getMBPerSec(), 0.0d); | ||
} | ||
} |