mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-09 14:34:43 +00:00
We previously rejected removing the number of replicas setting, which prevents users from reverting this setting to its default the natural way. To fix this, we put back the setting with the default value in the cases that the user is trying to remove it. Yet, we also need to do the work of updating the routing table and so on appropriately. This case was missed because when the setting is being removed, we were defaulting to -1 in this code path, which is treated as not being updated. Instead, we must treat the case when we are removing this setting as if the setting is being updated, too. This commit does that.