Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4d7a3fe

Browse files
QQ: exclude delivery_limit from policy repair comparison.
As it cannot be updated as part of a policy when it is disabled (-1) it needs to be excluded from comparison
1 parent 676698a commit 4d7a3fe

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

‎deps/rabbit/src/rabbit_quorum_queue.erl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -770,15 +770,19 @@ system_recover(quorum_queues) ->
770770
end.
771771

772772
maybe_apply_policies(Q, #{config := CurrentConfig}) ->
773-
NewPolicyConfig = gather_policy_config(Q, false),
773+
%% delivery_limit can't be updated from a policy and thus has to be
774+
%% excluded from the comparison
775+
NewPolicyConfig = maps:without([delivery_limit],
776+
gather_policy_config(Q, false)),
774777

775778
RelevantKeys = maps:keys(NewPolicyConfig),
776779
CurrentPolicyConfig = maps:with(RelevantKeys, CurrentConfig),
777780

778781
ShouldUpdate = NewPolicyConfig =/= CurrentPolicyConfig,
779782
case ShouldUpdate of
780783
true ->
781-
?LOG_DEBUG("Re-applying policies to ~ts", [rabbit_misc:rs(amqqueue:get_name(Q))]),
784+
?LOG_DEBUG("Re-applying policies for ~ts",
785+
[rabbit_misc:rs(amqqueue:get_name(Q))]),
782786
policy_changed(Q),
783787
ok;
784788
false -> ok

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /