From 1005a30a32d9afd9b4c68673e7ae43155573a02e Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Thu, 20 Feb 2025 12:27:56 -0500 Subject: [PATCH] Run `rabbit_registry` boot step after `pre_boot` The `rabbit_registry` boot step starts up the `rabbit_registry` gen server from `rabbit_common`. This is a registry somewhat similar to the feature flag registry - it's meant to protect an ETS table used for looking up implementers of behaviors. The registry and its ETS table should be available as early as possible: the step should enable external_infrastructure rather than require it. (cherry picked from commit 386701273fff89d03058f5f62fb8a6f24cce3d5a) --- deps/rabbit/src/rabbit.erl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/deps/rabbit/src/rabbit.erl b/deps/rabbit/src/rabbit.erl index 915d18230b11..525b1db835ac 100644 --- a/deps/rabbit/src/rabbit.erl +++ b/deps/rabbit/src/rabbit.erl @@ -65,6 +65,13 @@ {requires, pre_boot}, {enables, external_infrastructure}]}). +-rabbit_boot_step({rabbit_registry, + [{description, "plugin registry"}, + {mfa, {rabbit_sup, start_child, + [rabbit_registry]}}, + {requires, pre_boot}, + {enables, database}]}). + -rabbit_boot_step({database, [{mfa, {rabbit_db, init, []}}, {requires, file_handle_cache}, @@ -110,13 +117,6 @@ -rabbit_boot_step({external_infrastructure, [{description, "external infrastructure ready"}]}). --rabbit_boot_step({rabbit_registry, - [{description, "plugin registry"}, - {mfa, {rabbit_sup, start_child, - [rabbit_registry]}}, - {requires, external_infrastructure}, - {enables, kernel_ready}]}). - -rabbit_boot_step({rabbit_core_metrics, [{description, "core metrics storage"}, {mfa, {rabbit_sup, start_child,