Skip to content
This repository was archived by the owner on Jul 9, 2024. It is now read-only.

Commit fb724fb

Browse files
committed
Remove table locking
1 parent f9a69d6 commit fb724fb

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/rabbit_exchange_type_consistent_hash.erl

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,6 @@ add_binding(transaction, X,
152152
B = #binding{source = S, destination = D, key = K}) ->
153153
Weight = rabbit_data_coercion:to_integer(K),
154154

155-
mnesia:write_lock_table(?HASH_RING_STATE_TABLE),
156-
157155
case mnesia:read(?HASH_RING_STATE_TABLE, S) of
158156
[State0 = #chx_hash_ring{bucket_map = BM0,
159157
next_bucket_number = NexN0}] ->
@@ -176,8 +174,6 @@ add_binding(none, _X, _B) ->
176174
ok.
177175

178176
remove_bindings(transaction, _X, Bindings) ->
179-
mnesia:write_lock_table(?HASH_RING_STATE_TABLE),
180-
181177
[remove_binding(B) || B <- Bindings],
182178

183179
ok;
@@ -189,8 +185,6 @@ remove_bindings(none, X, Bindings) ->
189185
remove_binding(#binding{source = S, destination = D, key = RK}) ->
190186
Weight = rabbit_data_coercion:to_integer(RK),
191187

192-
mnesia:write_lock_table(?HASH_RING_STATE_TABLE),
193-
194188
case mnesia:read(?HASH_RING_STATE_TABLE, S) of
195189
[State0 = #chx_hash_ring{bucket_map = BM0,
196190
next_bucket_number = NexN0}] ->

0 commit comments

Comments
 (0)