Skip to content

Commit

Permalink
Use more number of nodes with lesser primary shards to decrease chanc…
Browse files Browse the repository at this point in the history
…es of primary accumulation on one node

Signed-off-by: Suraj Singh <[email protected]>
  • Loading branch information
dreamer-89 committed Mar 26, 2023
1 parent eb8405a commit 48f5623
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,11 @@ public void testSingleIndexShardAllocation() throws Exception {
public void testAllocationWithDisruption() throws Exception {
internalCluster().startClusterManagerOnlyNode();
final int maxReplicaCount = 2;
final int maxShardCount = 5;
final int maxShardCount = 2;
// Create maxReplicaCount+2 number of nodes. maxReplicaCount for replica shards & 1 node for primary shard
// allocation. One extra node to ensure post failover, primary shards do not remain stuck on one node due to
// SameShardAllocationDecider preventing re-balancing
final int nodeCount = randomIntBetween(maxReplicaCount + 2, 10);
final int nodeCount = randomIntBetween(5, 10);
final int numberOfIndices = randomIntBetween(1, 10);

logger.info("--> Creating {} nodes", nodeCount);
Expand Down

0 comments on commit 48f5623

Please sign in to comment.