opensearch-project/OpenSearch

[BUG] Configuring cluster.allocator.existing_shards_allocator.batch_enabled via /_cluster/settings returns a 400 error

Open

#14,744 创建于 2024年7月12日

在 GitHub 查看
 (8 评论) (1 反应) (1 负责人)Java (1,505 fork)batch import
Cluster ManagerOtherbuggood first issue

仓库指标

Star
 (8,123 star)
PR 合并指标
 (平均合并 5天 9小时) (30 天内合并 266 个 PR)

描述

Describe the bug

OpenSearch 2.14 introduced a new feature/setting: cluster.allocator.existing_shards_allocator.batch_enabled.

This setting is documented as being able be set dynamically:

https://opensearch.org/docs/latest/install-and-configure/configuring-opensearch/cluster-settings/#cluster-level-routing-and-allocation-settings

All settings in this list are dynamic:

However, when attempting to set using /_cluster/settings API endpoint, an error is returned:

{
    "error": {
        "root_cause": [
            {
                "type": "illegal_argument_exception",
                "reason": "persistent setting [cluster.allocator.existing_shards_allocator.batch_enabled], not dynamically updateable"
            }
        ],
        "type": "illegal_argument_exception",
        "reason": "persistent setting [cluster.allocator.existing_shards_allocator.batch_enabled], not dynamically updateable"
    },
    "status": 400
}

Payload used in PUT request:

{
    "persistent": {
        "cluster.allocator.existing_shards_allocator.batch_enabled": true
    }
}

Related component

Other

To Reproduce

  1. use OpenSearch 2.14 or 2.15
  2. Send a PUT request to /_cluster/settings
{
    "persistent": {
        "cluster.allocator.existing_shards_allocator.batch_enabled": true
    }
}

Expected behavior

Expectation is that if the documentation says this is a dynamic setting, it can be set dynamically. If this must be set via opensearch.yml (which does work), this should be communicated/documented.

Additional Details

Plugins Stock/out of box

Host/Environment (please complete the following information):

  • OS: Ubuntu Server 22.04 LTS
  • OpenSearch Version: 2.15.0

Additional context

First learned about this from the following WARN in opensearch's log:

Falling back to single shard assignment since batch mode disable or multiple custom allocators set

贡献者指南