Open Rassyan opened 3 weeks ago
Pinging @elastic/es-distributed (Team:Distributed)
I am re-labelling this to :Data Management/Indices APIs
since both linked issues are with that label. Please feel free to reroute if it should be looked into by the distributed team.
Pinging @elastic/es-data-management (Team:Data Management)
Elasticsearch Version
8.14.0
Installed Plugins
No response
Java Version
bundled
OS Version
N/A
Problem Description
Description
There are critical issues with the
index.number_of_routing_shards
setting in Elasticsearch:index.number_of_routing_shards
is set toindex.number_of_shards
, which does not align with the actual computed value ofrouting_num_shards
.index.number_of_routing_shards
can be modified after the index is closed, butrouting_num_shards
remains unchanged, leading to inconsistencies.index.number_of_routing_shards
is explicitly set, it is not retrievable via the_settings
API and can only be accessed through_cluster/state/metadata
.These issues cause confusion and misconfiguration, as the actual routing behavior is governed by
routing_num_shards
, which is not directly accessible or modifiable in a straightforward manner.Related Issues
https://github.com/elastic/elasticsearch/issues/75137 https://github.com/elastic/elasticsearch/issues/33036
Summary
To address these issues:
index.number_of_routing_shards
and its relationship withrouting_num_shards
._settings
API returns the actual value ofindex.number_of_routing_shards
and aligns withrouting_num_shards
.index.number_of_routing_shards
after index creation or clearly document its immutability.These changes will help users better understand and configure their indices, avoiding potential pitfalls and confusion.
Steps to Reproduce
Step 1: Default Value Mismatch
Step 2: Post-Close Modifiability
Step 3: Retrieval Discrepancies
Logs (if relevant)
No response