summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@lshift.net>2010-01-18 11:01:44 +0000
committerMatthew Sackman <matthew@lshift.net>2010-01-18 11:01:44 +0000
commit638f2c94e1fc201806710056641685d3ca169ae7 (patch)
treea0623ab7fecd70aba041f1cac2bed653ea6dea0d
parent33caa1d97ca81b59ebc44bef84feaaef2cf86e2c (diff)
downloadrabbitmq-server-git-638f2c94e1fc201806710056641685d3ca169ae7.tar.gz
Of course, we should only delete messages when they're, err, due to be deleted...
-rw-r--r--src/rabbit_msg_store.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rabbit_msg_store.erl b/src/rabbit_msg_store.erl
index 272db825eb..82110c7d1a 100644
--- a/src/rabbit_msg_store.erl
+++ b/src/rabbit_msg_store.erl
@@ -695,12 +695,12 @@ 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),
- true = case File =:= CurFile of
- true -> ets:delete(?CUR_FILE_CACHE_ETS_NAME, MsgId);
- false -> true
- end,
case RefCount of
1 ->
+ true = case File =:= CurFile of
+ true -> ets:delete(?CUR_FILE_CACHE_ETS_NAME, MsgId);
+ false -> true
+ end,
ok = remove_cache_entry(MsgId),
[FSEntry = #file_summary { valid_total_size = ValidTotalSize,
contiguous_top = ContiguousTop,