Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.x] Fix null value usage for index.number_of_routing_shards setting. #76176

Closed
wants to merge 1 commit into from

Conversation

martijnvg
Copy link
Member

Backport #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 #75139

…stic#76069)

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
@martijnvg martijnvg force-pushed the backport_76069_7.x branch from 0546e17 to 9be5b19 Compare August 5, 2021 13:41
@martijnvg martijnvg closed this Aug 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants