@@ -232,7 +232,7 @@ warn_file_limit() ->
232
232
recover (VHost ) ->
233
233
Queues = find_durable_queues (VHost ),
234
234
{Classic , Quorum } = filter_per_type (Queues ),
235
- recover_classic_queues (VHost , Classic ) ++ recover_quorum_queues (VHost , Quorum ).
235
+ recover_classic_queues (VHost , Classic ) ++ recover_quorum_queues (Quorum ).
236
236
237
237
recover_classic_queues (VHost , Queues ) ->
238
238
{ok , BQ } = application :get_env (rabbit , backing_queue_module ),
@@ -249,9 +249,9 @@ recover_classic_queues(VHost, Queues) ->
249
249
throw ({error , Reason })
250
250
end .
251
251
252
- recover_quorum_queues (VHost , Queues ) ->
252
+ recover_quorum_queues (Queues ) ->
253
253
[begin
254
- ok = ra :restart_node (ra_node_config (VHost , Id )),
254
+ ok = ra :restart_node (ra_node_config (Id )),
255
255
internal_declare (Q , true )
256
256
end || # amqqueue {pid = Id } = Q <- Queues ].
257
257
@@ -399,16 +399,16 @@ declare_classic_queue(QueueName, Q, VHost, Node) ->
399
399
[rabbit_misc :rs (QueueName ), Node1 , Error ])
400
400
end .
401
401
402
- declare_quorum_queue (QueueName , # amqqueue { vhost = VHost } = Q ) ->
402
+ declare_quorum_queue (QueueName , Q ) ->
403
403
RaName = qname_to_rname (QueueName ),
404
404
Id = {RaName , node ()},
405
405
NewQ = Q # amqqueue {pid = Id },
406
- ok = ra :start_node (ra_node_config (VHost , Id )),
406
+ ok = ra :start_node (ra_node_config (Id )),
407
407
_ = ra_node_proc :trigger_election (Id ),
408
408
internal_declare (NewQ , false ),
409
409
{new , NewQ }.
410
410
411
- ra_node_config (VHost , {Name , _ } = Id ) ->
411
+ ra_node_config ({Name , _ } = Id ) ->
412
412
{ok , DataDir } = application :get_env (ra , data_dir ),
413
413
UId = atom_to_binary (Name , utf8 ),
414
414
#{id => Id ,
@@ -419,11 +419,6 @@ ra_node_config(VHost, {Name, _} = Id) ->
419
419
initial_nodes => [],
420
420
machine => {module , ra_fifo }}.
421
421
422
- vhost_dir (<<" /" >>) ->
423
- " %2F" ;
424
- vhost_dir (Other ) ->
425
- binary_to_list (Other ).
426
-
427
422
% % TODO escape hack
428
423
qname_to_rname (# resource {virtual_host = <<" /" >>, name = Name }) ->
429
424
erlang :binary_to_atom (<<" %2F_" , Name /binary >>, utf8 );
@@ -846,7 +841,7 @@ i_quorum(messages_ready, #amqqueue{pid = {Name, _}}) ->
846
841
i_quorum (messages_unacknowledged , # amqqueue {pid = {Name , _ }}) ->
847
842
[{_ , _ , Checkout , Settle , Return }] = ets :lookup (ra_fifo_metrics , Name ),
848
843
Checkout - Settle - Return ;
849
- i_quorum (K , _Q ) -> '' .
844
+ i_quorum (_K , _Q ) -> '' .
850
845
851
846
quorum_messages (Name ) ->
852
847
[{_ , Enqueue , _ , Settle , _ }] = ets :lookup (ra_fifo_metrics , Name ),
@@ -1031,7 +1026,8 @@ credit(#amqqueue{pid = QPid}, ChPid, CTag, Credit, Drain) ->
1031
1026
1032
1027
basic_get (# amqqueue {pid = QPid , type = classic }, ChPid , NoAck , LimiterPid ) ->
1033
1028
delegate :invoke (QPid , {gen_server2 , call , [{basic_get , ChPid , NoAck , LimiterPid }, infinity ]});
1034
- basic_get (# amqqueue {name = QName , pid = {Name , _ } = Id , type = quorum }, ChPid , NoAck , LimiterPid ) ->
1029
+ basic_get (# amqqueue {name = QName , pid = {Name , _ } = Id , type = quorum }, _ChPid , NoAck ,
1030
+ _LimiterPid ) ->
1035
1031
ra :send_and_await_consensus (Id , {checkout , get , self ()}),
1036
1032
receive
1037
1033
{ra_event , _ , machine , {msg , _ , empty }} ->
0 commit comments