summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJean-Sébastien Pédron <jean-sebastien@rabbitmq.com>2020-04-08 14:50:49 +0200
committerJean-Sébastien Pédron <jean-sebastien@rabbitmq.com>2020-04-09 10:21:18 +0200
commitccd559495ddb7b1fbaee9451c78655a6d8417ef0 (patch)
tree2f2beb471a4b251d503e17641359aeea3ba5b0cd /src
parente034a68583c3f8725f56e2a1b0260acbde22beff (diff)
downloadrabbitmq-server-git-ccd559495ddb7b1fbaee9451c78655a6d8417ef0.tar.gz
feature_flags_SUITE: New testcase to test concurrent registry loading
As of this commit, it show two issues with the current implementation of the feature flags registry reloading: * There is a small time window where there is no registry module loaded while it is replaced. * The newer registry might be initialized with older data. Follow-up commits will address them.
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_feature_flags.erl7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/rabbit_feature_flags.erl b/src/rabbit_feature_flags.erl
index e8cf31e0b7..63b920ea19 100644
--- a/src/rabbit_feature_flags.erl
+++ b/src/rabbit_feature_flags.erl
@@ -133,7 +133,8 @@
initialize_registry/3,
query_supported_feature_flags/0,
mark_as_enabled_remotely/2,
- mark_as_enabled_remotely/4]).
+ mark_as_enabled_remotely/4,
+ registry_loading_lock/0]).
-endif.
%% Default timeout for operations on remote nodes.
@@ -1244,6 +1245,10 @@ maybe_log_registry_source_code(Forms) ->
ok
end.
+-ifdef(TEST).
+registry_loading_lock() -> ?FF_REGISTRY_LOADING_LOCK.
+-endif.
+
-spec load_registry_mod(atom(), binary()) ->
ok | {error, any()} | no_return().
%% @private