summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@lshift.net>2010-03-04 18:21:18 +0000
committerMatthew Sackman <matthew@lshift.net>2010-03-04 18:21:18 +0000
commit95ed9fa5e8de814ae6ba491ecad314f1e0a3f7f5 (patch)
tree50ff64c7a6194ac8c6c0479dbbc4be90d77f2468 /src
parentcc60355886e99494edc9c0468b1eeaec8200a3d2 (diff)
downloadrabbitmq-server-git-95ed9fa5e8de814ae6ba491ecad314f1e0a3f7f5.tar.gz
Minor bug fix, but I don't think this is what's plaguing majek atm
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_msg_store.erl10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/rabbit_msg_store.erl b/src/rabbit_msg_store.erl
index 5e1c03110b..85f5526ec7 100644
--- a/src/rabbit_msg_store.erl
+++ b/src/rabbit_msg_store.erl
@@ -782,17 +782,15 @@ contains_message(MsgId, From, State = #msstate { gc_active = GCActive }) ->
end
end.
-remove_message(MsgId, State = #msstate { sum_valid_data = SumValid,
- current_file = CurFile }) ->
+remove_message(MsgId, State = #msstate { sum_valid_data = SumValid }) ->
#msg_location { ref_count = RefCount, file = File,
offset = Offset, total_size = TotalSize } =
index_lookup(MsgId, State),
case RefCount of
1 ->
- true = case File =:= CurFile of
- true -> ets:delete(?CUR_FILE_CACHE_ETS_NAME, MsgId);
- false -> true
- end,
+ %% don't remove from CUR_FILE_CACHE_ETS_NAME here because
+ %% there may be further writes in the mailbox for the same
+ %% msg.
ok = remove_cache_entry(MsgId),
[#file_summary { valid_total_size = ValidTotalSize,
contiguous_top = ContiguousTop,