rabbitmq / rabbitmq-server

Open source RabbitMQ: core server and tier 1 (built-in) plugins
https://www.rabbitmq.com/
Other
12.15k stars 3.91k forks source link

rabbit_runtime_parameters: Remove dead 'value_global/2', 'value/4' #11614

Closed the-mikedavis closed 3 months ago

the-mikedavis commented 3 months ago

rabbit_runtime_parameters:value_global/2 was only used in rabbit_nodes:cluster_name/0 since near the beginning of the commit history of the server and its usage was eliminated in 06932b9fcbc (#3085, released in v3.8.17+ and v3.9.0+).

rabbit_runtime_parameters:value/4 doesn't appear to have been ever used since it was introduced near the beginning of the commit history. It may have been added just to mirror value_global/2's interface.

Eliminating these dead functions allows us to also eliminate a somewhat complicated function rabbit_db_rtparams:get_or_set/2.

This change is ported out of #10915 and was introduced there so we don't need to refactor these functions to handle database errors.