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
commit4ca426c2c331559a7da6863157b7880f383639ea (patch)
treea0623ab7fecd70aba041f1cac2bed653ea6dea0d
parent94104a79164e4bd1d15a155ec5d8f65ac4716d8e (diff)
downloadrabbitmq-server-4ca426c2c331559a7da6863157b7880f383639ea.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 272db825..82110c7d 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,