Disabling replica allocation will avoid rebalancing on cluster shutdown as dobe points out, but not on cluster restart, if the nodes don't all come up around the same time. Set the gateway parameters as described at http://www.elasticsearch.org/guide/reference/modules/gateway/index.html
To give all your nodes time to initialize before recovery/rebalancing is performed. For example, in a cluster with 3 nodes and 1 replica per shard, you might set the parameters to:
Which would give the 3rd node up to 5 minutes to finish initializing before the first 2 nodes give up on it and start rebalancing.
On Mar 6, 2012, at 4:32 AM, dobe wrote:
this is described here https://github.com/elasticsearch/elasticsearch/issues/1358
On Tuesday, March 6, 2012 12:13:24 PM UTC+1, Otis Gospodnetic wrote:
We've been doing a lot of ElasticSearch performance testing lately. While testing, we've experienced the "ES shard dance" shown in the attachment whenever we restarted any of the nodes. This, of course, made testing hard because we couldn't keep a fixed shard distribution between restarts and between some of the test runs, plus it slowed us down (you can see this shard dance took over 1 hour).
Is it possible to start ElasticSearch and tell it not to move any shards around even if it thinks there is a better way to distribute them?
Hiring ElasticSearch Engineers World-Wide -- http://sematext.com/about/jobs.html#search