summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@lshift.net>2010-02-12 11:32:49 +0000
committerMatthias Radestock <matthias@lshift.net>2010-02-12 11:32:49 +0000
commitdc9bf08b21dedbf4f2cfee557229f09f6471c0a7 (patch)
treec3f2f9f27f759647ee48fae3b3d907d10ff636e9 /src
parent964be0e9fc737f6d16ef39420a566b4c56e2111e (diff)
parent170f35b1e9ffc8abcbf64a36067502550d30e695 (diff)
downloadrabbitmq-server-git-dc9bf08b21dedbf4f2cfee557229f09f6471c0a7.tar.gz
merge heads
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_msg_store.erl6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rabbit_msg_store.erl b/src/rabbit_msg_store.erl
index 2a4eadc91f..2db3c34e9b 100644
--- a/src/rabbit_msg_store.erl
+++ b/src/rabbit_msg_store.erl
@@ -531,12 +531,16 @@ handle_cast({write, MsgId, Msg},
{ sum_valid_data = SumValid + TotalSize,
sum_file_size = SumFileSize + TotalSize }
)));
- #msg_location { ref_count = RefCount } ->
+ #msg_location { ref_count = RefCount, file = File } ->
%% We already know about it, just update counter. Only
%% update field otherwise bad interaction with concurrent GC
ok = index_update_fields(MsgId,
{#msg_location.ref_count, RefCount + 1},
State),
+ true = case File == CurFile of
+ true -> true;
+ false -> ets:delete(?CUR_FILE_CACHE_ETS_NAME, MsgId)
+ end,
noreply(State)
end;