mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-09 14:34:43 +00:00
Prior to this commit, `cluster.max_shards_per_node` is not correctly handled when it is set via the YAML config file, only when it is set via the Cluster Settings API. This commit refactors how the limit is implemented, both to enable correctly handling the setting in the YAML and to more effectively centralize the logic used to enforce the limit. The logic used to apply the limit, as well as the setting value, has been moved to the new `ShardLimitValidator`.