Reputation: 3465
I have configured two node cluster and created an index
with 4 shards
and 1 replica
Elastic created 2 primary shards on each node, this is how it looks from head plugin. shard 1
, shard 3
are primary on node 1(stephen1c7)
AND shard 0
and shard 2
are primary on node 2(stephen2c7)
Now i have shutdown the node 2(stephen2c7)
to see if all the shards on node 1(stephen1c7)
became primary. Yes, all shards are now primary.
Now i have made the Node 2(stephen2c7)
up again to see if any shards on this node will be primary. But surprisingly no shard on this node became primary. Waited for long time but still no shard is primary on Node 2
.
Why so?
Is there any configuration to set for making the shards primary again after a node is up?
Thanks in advance!
Upvotes: 2
Views: 174
Reputation: 4808
Given this post and this one (albeit slightly old),balancing the primary and replica shard across the cluster does not seem to be a priority in an Elastic cluster. As you can see, Elastic sees replica and primary shard and thus the status seems satisfactory for the cluster.
What I would suggest is to have a look at the shard balancing heuristic and play with these values until you obtain a satisfactory result. (as is often the case with ElasticSearch, testing several parameters is what will yield the best configuration given your architectural design choices).
Note that if you start using shard balancing heuristic, you might not get good results if you use at the same time shard filtering or forced awareness
Upvotes: 1