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
This commit is contained in:
parent
676698a233
commit
4d7a3fed1e
|
@ -770,7 +770,10 @@ system_recover(quorum_queues) ->
|
||||||
end.
|
end.
|
||||||
|
|
||||||
maybe_apply_policies(Q, #{config := CurrentConfig}) ->
|
maybe_apply_policies(Q, #{config := CurrentConfig}) ->
|
||||||
NewPolicyConfig = gather_policy_config(Q, false),
|
%% delivery_limit can't be updated from a policy and thus has to be
|
||||||
|
%% excluded from the comparison
|
||||||
|
NewPolicyConfig = maps:without([delivery_limit],
|
||||||
|
gather_policy_config(Q, false)),
|
||||||
|
|
||||||
RelevantKeys = maps:keys(NewPolicyConfig),
|
RelevantKeys = maps:keys(NewPolicyConfig),
|
||||||
CurrentPolicyConfig = maps:with(RelevantKeys, CurrentConfig),
|
CurrentPolicyConfig = maps:with(RelevantKeys, CurrentConfig),
|
||||||
|
@ -778,7 +781,8 @@ maybe_apply_policies(Q, #{config := CurrentConfig}) ->
|
||||||
ShouldUpdate = NewPolicyConfig =/= CurrentPolicyConfig,
|
ShouldUpdate = NewPolicyConfig =/= CurrentPolicyConfig,
|
||||||
case ShouldUpdate of
|
case ShouldUpdate of
|
||||||
true ->
|
true ->
|
||||||
?LOG_DEBUG("Re-applying policies to ~ts", [rabbit_misc:rs(amqqueue:get_name(Q))]),
|
?LOG_DEBUG("Re-applying policies for ~ts",
|
||||||
|
[rabbit_misc:rs(amqqueue:get_name(Q))]),
|
||||||
policy_changed(Q),
|
policy_changed(Q),
|
||||||
ok;
|
ok;
|
||||||
false -> ok
|
false -> ok
|
||||||
|
|
Loading…
Reference in New Issue