summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2013-06-17 16:59:43 +0100
committerSimon MacMullen <simon@rabbitmq.com>2013-06-17 16:59:43 +0100
commitc4acf73d03824c83b4e3f7c4ae09130cbc6dacfb (patch)
tree28e1f542dfcd2311e880015790efc227834b911c /src
parentf2e321591a3ef7decd7639185b7bfbe3a63866e5 (diff)
parent6f7065945494a8dc49324e446e55352dec2b7a59 (diff)
downloadrabbitmq-server-git-c4acf73d03824c83b4e3f7c4ae09130cbc6dacfb.tar.gz
stable to default
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_msg_store.erl8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/rabbit_msg_store.erl b/src/rabbit_msg_store.erl
index c63321b5e5..7c2aa13c78 100644
--- a/src/rabbit_msg_store.erl
+++ b/src/rabbit_msg_store.erl
@@ -627,7 +627,10 @@ client_update_flying(Diff, MsgId, #client_msstate { flying_ets = FlyingEts,
Key = {MsgId, CRef},
case ets:insert_new(FlyingEts, {Key, Diff}) of
true -> ok;
- false -> try ets:update_counter(FlyingEts, Key, {2, Diff})
+ false -> try ets:update_counter(FlyingEts, Key, {2, Diff}) of
+ 0 -> ok;
+ Diff -> ok;
+ Err -> throw({bad_flying_ets_update, Diff, Err, Key})
catch error:badarg ->
%% this is guaranteed to succeed since the
%% server only removes and updates flying_ets
@@ -980,7 +983,8 @@ update_flying(Diff, MsgId, CRef, #msstate { flying_ets = FlyingEts }) ->
true = ets:delete_object(FlyingEts, {Key, 0}),
process;
[{_, 0}] -> true = ets:delete_object(FlyingEts, {Key, 0}),
- ignore
+ ignore;
+ [{_, Err}] -> throw({bad_flying_ets_record, Diff, Err, Key})
end.
write_action({true, not_found}, _MsgId, State) ->