-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Use settings infrastructure for shards and replicas #56801
Use settings infrastructure for shards and replicas #56801
Conversation
We get the number of shards and replicas with our bare hands in index metadata, rather than letting the settings infrastructure do the work for us. This commit switches to using the settings infrastructure.
Pinging @elastic/es-core-infra (:Core/Infra/Settings) |
I don't think this addresses the problem I was trying to solve in #56712. The problem as I see it is both MetadataCreateIndexService and MetadataUpdateSettingsService both having their own default value logic, instead of using the Setting. Thus the default of 1 is defined in several places. |
@rjernst I took it further. |
@elasticmachine update branch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes. It still seems odd to me to be reading and setting back as we do, but as I understand from your comments there are other places constructing IndexMetadata with temporary values for the number of replicas. Is that the case for shards though? Shouldn't that never change, so we could always read it in IndexMetadata and not read+set externally?
Either way, this is better than what existed since the default value no longer exists in multiple places, thank you! LGTM.
We get the number of shards and replicas with our bare hands in index metadata, rather than letting the settings infrastructure do the work for us. This commit switches to using the settings infrastructure.
We get the number of shards and replicas with our bare hands in index metadata, rather than letting the settings infrastructure do the work for us. This commit switches to using the settings infrastructure.
Relates #56712