Refresh at end of concurrent relocate test
We have to do something to force the global checkpoint to be synchronized to the replicas or the assertions at the end of the test that they are in sync will trip. Since the last write operation to hit a replica shard will only carry the penultimate global checkpoint (it will advance when the replicas respond with their local checkpoint), and a background sync will not happen until the primary shard falls idle, we force a sync through a refresh action.
This commit is contained in:
parent
349d1bd23e
commit
0b089ac084
|
@ -367,10 +367,11 @@ public class RelocationIT extends ESIntegTestCase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// refresh is a replication action so this forces a global checkpoint sync which is needed as these are asserted on in tear down
|
|
||||||
client().admin().indices().prepareRefresh("test").get();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// refresh is a replication action so this forces a global checkpoint sync which is needed as these are asserted on in tear down
|
||||||
|
client().admin().indices().prepareRefresh("test").get();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testCancellationCleansTempFiles() throws Exception {
|
public void testCancellationCleansTempFiles() throws Exception {
|
||||||
|
@ -506,6 +507,10 @@ public class RelocationIT extends ESIntegTestCase {
|
||||||
assertNoFailures(afterRelocation);
|
assertNoFailures(afterRelocation);
|
||||||
assertSearchHits(afterRelocation, ids.toArray(new String[ids.size()]));
|
assertSearchHits(afterRelocation, ids.toArray(new String[ids.size()]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// refresh is a replication action so this forces a global checkpoint sync which is needed as these are asserted on in tear down
|
||||||
|
client().admin().indices().prepareRefresh("test").get();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class RecoveryCorruption extends MockTransportService.DelegateTransport {
|
class RecoveryCorruption extends MockTransportService.DelegateTransport {
|
||||||
|
|
Loading…
Reference in New Issue