From 67058097c80d53d7895cac4c35924f6f99776f06 Mon Sep 17 00:00:00 2001 From: Karl Nilsson Date: Wed, 5 Apr 2023 17:10:10 +0100 Subject: [PATCH] Quorum queues: warn when policy command was not successful Else there is no way to know if a policy was fully applied or not. (cherry picked from commit f88034931ffc2522d611ee805235ea963e35e6cd) --- deps/rabbit/src/rabbit_quorum_queue.erl | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/deps/rabbit/src/rabbit_quorum_queue.erl b/deps/rabbit/src/rabbit_quorum_queue.erl index 5e5b5d2dcbb6..aeceae7caf8f 100644 --- a/deps/rabbit/src/rabbit_quorum_queue.erl +++ b/deps/rabbit/src/rabbit_quorum_queue.erl @@ -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'.