Skip to content

Commit 30ab653

Browse files
committed
rabbit_{mnesia,khepri}: Skip generic compat check if CheckNodesConsistency is false
[Why] `CheckNodesConsistency` is set to false when the `check_cluster_consistency()` is called as part of a node joining a cluster. And the generic compatibility check was already executed by `rabbit_db_cluster`. There is no need to run it again. This is even counter-productive with the improvement to `rabbit_feature_flags:check_node_compatibility/2` that follows.
1 parent 8126950 commit 30ab653

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

deps/rabbit/src/rabbit_khepri.erl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -871,10 +871,7 @@ check_cluster_consistency(Node, CheckNodesConsistency) ->
871871
Error
872872
end;
873873
{_OTP, _Rabbit, {ok, Status}} ->
874-
case rabbit_db_cluster:check_compatibility(Node) of
875-
ok -> {ok, Status};
876-
Error -> Error
877-
end
874+
{ok, Status}
878875
end.
879876

880877
remote_node_info(Node) ->

deps/rabbit/src/rabbit_mnesia.erl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -726,10 +726,7 @@ check_cluster_consistency(Node, CheckNodesConsistency) ->
726726
Error
727727
end;
728728
{_OTP, _Rabbit, _Protocol, {ok, Status}} ->
729-
case rabbit_db_cluster:check_compatibility(Node) of
730-
ok -> {ok, Status};
731-
Error -> Error
732-
end
729+
{ok, Status}
733730
end.
734731

735732
remote_node_info(Node) ->

0 commit comments

Comments
 (0)