diff options
-rw-r--r-- | src/gm.erl | 8 | ||||
-rw-r--r-- | src/rabbit_exchange_type_topic.erl | 2 |
2 files changed, 5 insertions, 5 deletions
@@ -1011,7 +1011,7 @@ prune_or_create_group(Self, GroupName) -> fun () -> GroupNew = #gm_group { name = GroupName, members = [Self], version = 0 }, - case mnesia:read(?GROUP_TABLE, GroupName) of + case mnesia:read(?GROUP_TABLE, GroupName, read) of [] -> mnesia:write(GroupNew), GroupNew; @@ -1029,7 +1029,7 @@ record_dead_member_in_group(Member, GroupName) -> {atomic, Group} = mnesia:sync_transaction( fun () -> [Group1 = #gm_group { members = Members, version = Ver }] = - mnesia:read(?GROUP_TABLE, GroupName), + mnesia:read(?GROUP_TABLE, GroupName, read), case lists:splitwith( fun (Member1) -> Member1 =/= Member end, Members) of {_Members1, []} -> %% not found - already recorded dead @@ -1049,7 +1049,7 @@ record_new_member_in_group(GroupName, Left, NewMember, Fun) -> mnesia:sync_transaction( fun () -> [#gm_group { members = Members, version = Ver } = Group1] = - mnesia:read(?GROUP_TABLE, GroupName), + mnesia:read(?GROUP_TABLE, GroupName, read), {Prefix, [Left | Suffix]} = lists:splitwith(fun (M) -> M =/= Left end, Members), Members1 = Prefix ++ [Left, NewMember | Suffix], @@ -1068,7 +1068,7 @@ erase_members_in_group(Members, GroupName) -> fun () -> [Group1 = #gm_group { members = [_|_] = Members1, version = Ver }] = - mnesia:read(?GROUP_TABLE, GroupName), + mnesia:read(?GROUP_TABLE, GroupName, read), case Members1 -- DeadMembers of Members1 -> Group1; Members2 -> Group2 = diff --git a/src/rabbit_exchange_type_topic.erl b/src/rabbit_exchange_type_topic.erl index ffd1e583..a61e380b 100644 --- a/src/rabbit_exchange_type_topic.erl +++ b/src/rabbit_exchange_type_topic.erl @@ -191,7 +191,7 @@ trie_child(X, Node, Word) -> case mnesia:read(rabbit_topic_trie_edge, #trie_edge{exchange_name = X, node_id = Node, - word = Word}) of + word = Word}, read) of [#topic_trie_edge{node_id = NextNode}] -> {ok, NextNode}; [] -> error end. |