Skip to content

cluster.max_shards_per_node derives shard count from default not template settings #44567

@mark54g

Description

@mark54g

Elasticsearch version (bin/elasticsearch --version):
Tested in version 6.x. May hit other versions

Plugins installed: []
N/A

JVM version (java -version):
N/A

OS version (uname -a if on a Unix-like system):
N/A

Description of the problem including expected versus actual behavior:

Steps to reproduce:

Have too many shards, and create index or reindex.

You will receive a warning that this will add [10] shards, irrespective of the number that would be created due to the template for that index setting those shards to a different number.

cluster.max_shards_per_node checks the default number of shards to be created, not the template settings for the index.

Provide logs (if relevant):

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Data Management/Indices APIsDO NOT USE. Use ":Distributed/Indices APIs" or ":StorageEngine/Templates" instead.>bug

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions