Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix null value usage for index.number_of_routing_shards setting. (ela…
…stic#76175) Backporting elastic#76069 to 7.x branch. Ensure that the same number of routing shards is used for new indices when `index.number_of_routing_shards` is not specified and `null` as value is specified. Without this change if no index.number_of_routing_shards has been specified then logic inside the MetadataCreateIndexService#getIndexNumberOfRoutingShards(...) kicks and calculates a default based on number of primary shards use that as the true number of routing shards. If a value is specified (including null) then the value the true number of routing shards is determined from the IndexMetadata.INDEX_NUMBER_OF_ROUTING_SHARDS_SETTING setting and in the case of when null is specified then the default value is gathered from the IndexMetadata.INDEX_NUMBER_OF_SHARDS_SETTING setting. Closes elastic#75139 Co-authored-by: Martijn van Groningen <[email protected]>
- Loading branch information