diff options
| author | Matthias Radestock <matthias@lshift.net> | 2010-02-12 11:32:49 +0000 |
|---|---|---|
| committer | Matthias Radestock <matthias@lshift.net> | 2010-02-12 11:32:49 +0000 |
| commit | dc9bf08b21dedbf4f2cfee557229f09f6471c0a7 (patch) | |
| tree | c3f2f9f27f759647ee48fae3b3d907d10ff636e9 /src | |
| parent | 964be0e9fc737f6d16ef39420a566b4c56e2111e (diff) | |
| parent | 170f35b1e9ffc8abcbf64a36067502550d30e695 (diff) | |
| download | rabbitmq-server-git-dc9bf08b21dedbf4f2cfee557229f09f6471c0a7.tar.gz | |
merge heads
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_msg_store.erl | 6 |
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; |
