diff options
author | Jerry Kuch <jerryk@vmware.com> | 2010-11-01 12:50:12 -0700 |
---|---|---|
committer | Jerry Kuch <jerryk@vmware.com> | 2010-11-01 12:50:12 -0700 |
commit | d37f8725c085841c63f6ce58890e0baefea54a25 (patch) | |
tree | 220773495b078fb5e7c2ae3a4849cadab46c3cad | |
parent | 92f60edc914c07f3702407b934592f772bd8063a (diff) | |
download | rabbitmq-server-bug23346.tar.gz |
Bug 23346: change appropriate usages of dict:find to dict:fetch in rabbit_[in]variable_queue.bug23346
-rw-r--r-- | src/rabbit_invariable_queue.erl | 2 | ||||
-rw-r--r-- | src/rabbit_variable_queue.erl | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/rabbit_invariable_queue.erl b/src/rabbit_invariable_queue.erl index 25c8a5ea..671634c4 100644 --- a/src/rabbit_invariable_queue.erl +++ b/src/rabbit_invariable_queue.erl @@ -298,7 +298,7 @@ persist_acks(QName, true, Txn, AckTags, PA) -> persist_work(Txn, QName, [{ack, {QName, Guid}} || Guid <- AckTags, begin - {ok, {Msg, _MsgProps}} + {Msg, _MsgProps} = dict:fetch(Guid, PA), Msg #basic_message.is_persistent end]); diff --git a/src/rabbit_variable_queue.erl b/src/rabbit_variable_queue.erl index 3f639423..9a33b57d 100644 --- a/src/rabbit_variable_queue.erl +++ b/src/rabbit_variable_queue.erl @@ -1236,7 +1236,7 @@ ack(MsgStoreFun, Fun, AckTags, State) -> persistent_count = PCount }} = lists:foldl( fun (SeqId, {Acc, State2 = #vqstate { pending_ack = PA }}) -> - {ok, AckEntry} = dict:find(SeqId, PA), + AckEntry = dict:fetch(SeqId, PA), {accumulate_ack(SeqId, AckEntry, Acc), Fun(AckEntry, State2 #vqstate { pending_ack = dict:erase(SeqId, PA) })} |