cluster.routing.allocation.enable:似乎没有一个不起作用



我使用以下代码段禁用碎片分配:

PUT _cluster/settings
{
"persistent": {
"cluster.routing.allocation.enable": "none"
}
}

我仔细检查了GET _cluster/settings',并确认它已被none设置。

但是当我使用下面的片段试图在节点之间移动碎片时。此举成功了,看起来"cluster.routing.allocation.enable": "none"没有生效?

POST /_cluster/reroute
{
"commands": [
{
"move": {
"index": "lib38",
"shard": 0,
"from_node": "node-1",
"to_node": "node-3"
}
}
]
}

手动重新路由碎片总是优先于配置。

cluster.routing.allocation.enable只是向集群提示不应进行自动重新分配。

在你的另一个问题中,你似乎担心自动再平衡。

最新更新