Easysearch、Elasticsearch 还是 Opensearch,是个问题

es重启一个节点就重新分片

匿名 | 发布于2017年06月13日 | 阅读数:7834

请教各位大神,es集群每重启一个数据节点就会触发索引重新分片吗,我现在的索引量很大,每次都要重新分片等半天。请问可以怎么设置吗?跪谢
已邀请:

yiyezhiqiu425

赞同来自:

重启集群的时候 先设置为 none,禁止自动同步,集群挨个重启完以后再改为all,开启自动同步
PUT /_cluster/settings
{
 "transient" : {
 "cluster.routing.allocation.enable" : "none"
 }
}

PUT /_cluster/settings
{
 "transient" : {
 "cluster.routing.allocation.enable" : "all"
 }
}
 

kennywu76 - Wood

赞同来自:

还有一个办法,设置索引在结点离开的情况下延迟分配shard,1.7以后的版本支持这个设置。 
参考:[url=https://www.elastic.co/guide/en/elasticsearch/reference/1.7/delayed-allocation.html]https://www.elastic.co/guide/e ... .html[/url]

要回复问题请先登录注册