elastic/elasticsearch

Some cluster settings don't take effect if set from elasticsearch.yml, but work fine if set via API

Open

#40,803 创建于 2019年4月3日

在 GitHub 查看
 (14 评论) (18 反应) (0 负责人)Java (25,882 fork)batch import
:Core/Infra/Settings>bugTeam:Core/Infrahelp wantedteam-discusstriaged

仓库指标

Star
 (76,700 star)
PR 合并指标
 (平均合并 2天) (30 天内合并 1,000 个 PR)

描述

Some cluster-level settings don't take effect unless they're set via the Cluster Settings API, and values specified in elasticsearch.yml are ignored. They'll show up in GET _cluster/settings?include_defaults=true but will be otherwise ignored.

This is caused by reading settings only from the cluster state - in order to be initialized in elasticsearch.yml, a variable needs to be set in memory and initialized from a different Settings object during startup and updated in a cluster state listener rather than being read directly from the cluster state.

So far, I've found these settings which don't respect values set in elasticsearch.yml: cluster.blocks.read_only cluster.max_shards_per_node fixed in https://github.com/elastic/elasticsearch/pull/57234.

/cc @joegallo who pointed this out

贡献者指南