In one of production systems we saw a strange situation. We have two nodes
in cluster. There is a very big index with nearly 30M docs (46 G size on
disk). The index configuration was 2 shard with 1 replica at the starting.
However, after a while we disabled replicas and restarted server. Now we
notified a strange situation. We saw that two shards of this index are at
the same node. Other node has no data about this index. When I run
_cluster/state I get following section regarding this index:
This can happen. The current balancing scheme is to balance based on the number of shards to get to an even number of shards per node. One way you can try and force one shard to move is to possibly close the other index (assuming you use 0.16).
There are plans for other balancing schemes including based on index size.
-shay.banon
On Monday, April 25, 2011 at 9:49 PM, Mustafa Sener wrote:
In one of production systems we saw a strange situation. We have two nodes in cluster. There is a very big index with nearly 30M docs (46 G size on disk). The index configuration was 2 shard with 1 replica at the starting. However, after a while we disabled replicas and restarted server. Now we notified a strange situation. We saw that two shards of this index are at the same node. Other node has no data about this index. When I run _cluster/state I get following section regarding this index:
This can happen. The current balancing scheme is to balance based on the
number of shards to get to an even number of shards per node. One way you
can try and force one shard to move is to possibly close the other index
(assuming you use 0.16).
There are plans for other balancing schemes including based on index
size.
-shay.banon
On Monday, April 25, 2011 at 9:49 PM, Mustafa Sener wrote:
In one of production systems we saw a strange situation. We have two nodes
in cluster. There is a very big index with nearly 30M docs (46 G size on
disk). The index configuration was 2 shard with 1 replica at the starting.
However, after a while we disabled replicas and restarted server. Now we
notified a strange situation. We saw that two shards of this index are at
the same node. Other node has no data about this index. When I run
_cluster/state I get following section regarding this index:
Closing the other index will cause it not to be available for search, but, it will also cause a rebalancing process (assuming you are using 0.16) that will move one shard from the first node to the other (to keep the number of shards even). Then, you can open that index again. Check the Open / Close index API. Its a hack, but the simplest / fastest way I can think in getting the other shard to move around.
On Tuesday, April 26, 2011 at 9:18 PM, Mustafa Sener wrote:
Hi,
I am using version 0.15.2. can you explain what you mean by closing other index?
This can happen. The current balancing scheme is to balance based on the number of shards to get to an even number of shards per node. One way you can try and force one shard to move is to possibly close the other index (assuming you use 0.16).
There are plans for other balancing schemes including based on index size.
-shay.banon
On Monday, April 25, 2011 at 9:49 PM, Mustafa Sener wrote:
In one of production systems we saw a strange situation. We have two nodes in cluster. There is a very big index with nearly 30M docs (46 G size on disk). The index configuration was 2 shard with 1 replica at the starting. However, after a while we disabled replicas and restarted server. Now we notified a strange situation. We saw that two shards of this index are at the same node. Other node has no data about this index. When I run _cluster/state I get following section regarding this index:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.