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

Sequence number based replica allocation #46959

Merged
merged 14 commits into from
Oct 13, 2019
Prev Previous commit
Next Next commit
test name
  • Loading branch information
dnhatn committed Oct 1, 2019
commit 8c88b825bfd9f9b7bfeb6e62f956813ae6b97e9c
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public void testFullClusterRestartPerformNoopRecovery() throws Exception {
.put(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 1)
.put(IndexSettings.INDEX_TRANSLOG_FLUSH_THRESHOLD_SIZE_SETTING.getKey(), randomIntBetween(10, 100) + "kb")
.put(IndexMetaData.SETTING_NUMBER_OF_REPLICAS, numOfReplicas)
.put(IndexSettings.FILE_BASED_RECOVERY_THRESHOLD_SETTING.getKey(), randomIntBetween(5, 10) * 0.1)
.put(IndexSettings.FILE_BASED_RECOVERY_THRESHOLD_SETTING.getKey(), 0.5)
.put(IndexService.GLOBAL_CHECKPOINT_SYNC_INTERVAL_SETTING.getKey(), "100ms")
.put(IndexService.RETENTION_LEASE_SYNC_INTERVAL_SETTING.getKey(), "100ms")));
ensureGreen(indexName);
Expand All @@ -229,8 +229,7 @@ public void testFullClusterRestartPerformNoopRecovery() throws Exception {
assertAcked(client().admin().cluster().prepareUpdateSettings()
.setTransientSettings(Settings.builder().put("cluster.routing.allocation.enable", "primaries").build()));
internalCluster().fullRestart();
// need to wait for events to ensure the reroute has happened since we perform it async when a new node joins.
client().admin().cluster().prepareHealth(indexName).setWaitForYellowStatus().setWaitForEvents(Priority.LANGUID).get();
ensureYellow(indexName);
assertAcked(client().admin().cluster().prepareUpdateSettings()
.setTransientSettings(Settings.builder().putNull("cluster.routing.allocation.enable").build()));
ensureGreen(indexName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public void testCancelRecoveryIfFoundCopyWithRetentionLease() {
assertThat(allocation.routingNodes().shardsWithState(ShardRoutingState.UNASSIGNED).get(0).shardId(), equalTo(shardId));
}

public void testNotCancellingRecoveryIfRetentionLeaseExistingRecovery() {
public void testNotCancellingRecoveryIfCurrentRecoveryHasRetentionLease() {
RoutingAllocation allocation = onePrimaryOnNode1And1ReplicaRecovering(yesAllocationDeciders());
List<RetentionLease> peerRecoveryRetentionLeasesOnPrimary = new ArrayList<>();
long retainingSeqNo = randomLongBetween(1, Long.MAX_VALUE);
Expand Down