gpt4 book ai didi

ElasticSearch:如何禁用所有分片的分片重新分配?

转载 作者:行者123 更新时间:2023-11-29 02:49:45 25 4
gpt4 key购买 nike

我开发了elasticsearch的搜索插件,但是在升级这个插件的时候,需要一个一个的关闭节点,每次都要等待很长时间的reallocation过程。在文档中,它说重新分配过程可以通过以下方式停止:

curl -XPUT localhost:9200/_cluster/settings -d '{
"transient" : {
"cluster.routing.allocation.enable" : "none"
}
}'

当我运行这个命令时,出现了以下错误:

ElasticsearchIllegalArgumentException[Can't update non dynamic settings[[index.transient.cluster.routing.allocation.enable]] for open indices[..]

我能做什么?

顺便说一句:抱歉我的英语不好...

最佳答案

这么近!

尝试:

curl -XPUT 'http://localhost:9200/_cluster/settings' -d '{
"transient" : {
"cluster.routing.allocation.disable_allocation": "true"
}}'

关于ElasticSearch:如何禁用所有分片的分片重新分配?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29408834/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com