Skip to content

Commit

Permalink
Quorum queues: warn when policy command was not successful
Browse files Browse the repository at this point in the history
Else there is no way to know if a policy was fully applied or not.
  • Loading branch information
kjnilsson committed Apr 5, 2023
1 parent ac89309 commit f880349
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 f880349

Please sign in to comment.