@@ -278,6 +278,7 @@ handle_call({init, Overall}, _From,
278
278
initial_childspecs = ChildSpecs }) ->
279
279
process_flag (trap_exit , true ),
280
280
LockId = mirrored_supervisor_locks :lock (Group ),
281
+ maybe_log_lock_acquisition_failure (LockId , Group ),
281
282
ok = pg :join (Group , Overall ),
282
283
rabbit_log :debug (" Mirrored supervisor: initializing, overall supervisor ~p joined group ~p " , [Overall , Group ]),
283
284
Rest = pg :get_members (Group ) -- [Overall ],
@@ -309,6 +310,7 @@ handle_call({start_child, ChildSpec}, _From,
309
310
group = Group ,
310
311
tx_fun = TxFun }) ->
311
312
LockId = mirrored_supervisor_locks :lock (Group ),
313
+ maybe_log_lock_acquisition_failure (LockId , Group ),
312
314
rabbit_log :debug (" Mirrored supervisor: asked to consider starting a child, group: ~p " , [Group ]),
313
315
Result = case maybe_start (Group , TxFun , Overall , Delegate , ChildSpec ) of
314
316
already_in_mnesia ->
@@ -549,3 +551,8 @@ restore_child_order(ChildSpecs, ChildOrder) ->
549
551
proplists :get_value (id (A ), ChildOrder )
550
552
< proplists :get_value (id (B ), ChildOrder )
551
553
end , ChildSpecs ).
554
+
555
+ maybe_log_lock_acquisition_failure (undefined = _LockId , Group ) ->
556
+ rabbit_log :warning (" Mirrored supervisor: could not acquire lock for group ~s " , [Group ]);
557
+ maybe_log_lock_acquisition_failure (_ , _ ) ->
558
+ ok .
0 commit comments