@@ -343,9 +343,6 @@ binding_action(Binding = #binding{source = SrcName,
343
343
Fun (Src , Dst , Binding # binding {args = SortedArgs })
344
344
end , ErrFun ).
345
345
346
- dirty_delete_object (Table , Record , _LockKind ) ->
347
- mnesia :dirty_delete_object (Table , Record ).
348
-
349
346
sync_route (Route , true , true , Fun ) ->
350
347
ok = Fun (rabbit_durable_route , Route , write ),
351
348
sync_route (Route , false , true , Fun );
@@ -415,15 +412,15 @@ remove_routes(Routes) ->
415
412
% % Of course the destination might not really be durable but it's
416
413
% % just as easy to try to delete it from the semi-durable table
417
414
% % than check first
418
- [ok = sync_route (R , false , true , fun dirty_delete_object /3 ) ||
415
+ [ok = sync_route (R , false , true , fun mnesia : delete_object /3 ) ||
419
416
R <- RamRoutes ],
420
- [ok = sync_route (R , true , true , fun dirty_delete_object /3 ) ||
417
+ [ok = sync_route (R , true , true , fun mnesia : delete_object /3 ) ||
421
418
R <- DiskRoutes ],
422
419
[R # route .binding || R <- Routes ].
423
420
424
421
remove_transient_routes (Routes ) ->
425
422
[begin
426
- ok = sync_transient_route (R , fun dirty_delete_object /3 ),
423
+ ok = sync_transient_route (R , fun mnesia : delete_object /3 ),
427
424
R # route .binding
428
425
end || R <- Routes ].
429
426
@@ -447,10 +444,7 @@ remove_for_destination(DstName, OnlyDurable, Fun) ->
447
444
lists :keysort (# binding .source , Bindings ), OnlyDurable ).
448
445
449
446
% % Instead of locking entire table on remove operations we can lock the
450
- % % affected resource only. This will allow us to use dirty_match_object for
451
- % % do faster search of records to delete.
452
- % % This works better when there are multiple resources deleted at once, for
453
- % % example when exclusive queues are deleted.
447
+ % % affected resource only.
454
448
lock_resource (Name ) ->
455
449
mnesia :lock ({global , Name , mnesia :table_info (rabbit_route , where_to_write )},
456
450
write ).
0 commit comments