diff options
author | Matthias Radestock <matthias@rabbitmq.com> | 2011-10-11 22:43:43 +0100 |
---|---|---|
committer | Matthias Radestock <matthias@rabbitmq.com> | 2011-10-11 22:43:43 +0100 |
commit | 466853a31cbfe577a2dbe0ff165f78f05ee84d9f (patch) | |
tree | 2c0be0edd9dd2314f227be3e6b4d82960f2f44f8 /src/rabbit_msg_store.erl | |
parent | a9ee9013b47cfb01df1d4cc7e328e2263ce99646 (diff) | |
download | rabbitmq-server-466853a31cbfe577a2dbe0ff165f78f05ee84d9f.tar.gz |
only confirm messages on 'remove' that are pending confirmation
Diffstat (limited to 'src/rabbit_msg_store.erl')
-rw-r--r-- | src/rabbit_msg_store.erl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rabbit_msg_store.erl b/src/rabbit_msg_store.erl index fc3cbebd..e4691b81 100644 --- a/src/rabbit_msg_store.erl +++ b/src/rabbit_msg_store.erl @@ -1103,9 +1103,10 @@ record_pending_confirm(CRef, MsgId, State) -> client_confirm(CRef, MsgIds, ActionTaken, State) -> update_pending_confirms( fun (MsgOnDiskFun, CTM) -> - MsgOnDiskFun(MsgIds, ActionTaken), case dict:find(CRef, CTM) of - {ok, Gs} -> MsgIds1 = gb_sets:difference(Gs, MsgIds), + {ok, Gs} -> MsgOnDiskFun(gb_sets:intersection(Gs, MsgIds), + ActionTaken), + MsgIds1 = gb_sets:difference(Gs, MsgIds), case gb_sets:is_empty(MsgIds1) of true -> dict:erase(CRef, CTM); false -> dict:store(CRef, MsgIds1, CTM) |