Skip to content

Commit

Permalink
Merge pull request #7853 from rabbitmq/qq-warn-when-policy-was-not-ap…
Browse files Browse the repository at this point in the history
…plied

Quorum queues: warn when policy command was not successful
  • Loading branch information
michaelklishin authored Apr 5, 2023
2 parents ac89309 + f880349 commit b86d693
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions deps/rabbit/src/rabbit_quorum_queue.erl
Original file line number Diff line number Diff line change
Expand Up @@ -976,8 +976,15 @@ maybe_delete_data_dir(UId) ->

policy_changed(Q) ->
QPid = amqqueue:get_pid(Q),
_ = rabbit_fifo_client:update_machine_state(QPid, ra_machine_config(Q)),
ok.
case rabbit_fifo_client:update_machine_state(QPid, ra_machine_config(Q)) of
ok ->
ok;
Err ->
FormattedQueueName = rabbit_misc:rs(amqqueue:get_name(Q)),
rabbit_log:warning("~s: policy may not have been successfully applied. Error: ~p",
[FormattedQueueName, Err]),
ok
end.

-spec cluster_state(Name :: atom()) -> 'down' | 'recovering' | 'running'.

Expand Down

0 comments on commit b86d693

Please sign in to comment.