[TEST] use routing partition size based on the max routing shards of the second split
This commit is contained in:
parent
e95d18ec23
commit
93a988c557
|
@ -120,8 +120,9 @@ public class SplitIndexIT extends ESIntegTestCase {
|
||||||
useRoutingPartition = randomBoolean();
|
useRoutingPartition = randomBoolean();
|
||||||
}
|
}
|
||||||
if (useRouting && useMixedRouting == false && useRoutingPartition) {
|
if (useRouting && useMixedRouting == false && useRoutingPartition) {
|
||||||
|
int numRoutingShards = MetaDataCreateIndexService.calculateNumRoutingShards(secondSplitShards, Version.CURRENT)-1;
|
||||||
settings.put("index.routing_partition_size",
|
settings.put("index.routing_partition_size",
|
||||||
randomIntBetween(1, MetaDataCreateIndexService.calculateNumRoutingShards(sourceShards, Version.CURRENT)-1));
|
randomIntBetween(1, numRoutingShards));
|
||||||
if (useNested) {
|
if (useNested) {
|
||||||
createInitialIndex.addMapping("t1", "_routing", "required=true", "nested1", "type=nested");
|
createInitialIndex.addMapping("t1", "_routing", "required=true", "nested1", "type=nested");
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue