summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@rabbitmq.com>2010-08-18 16:24:22 +0100
committerMatthew Sackman <matthew@rabbitmq.com>2010-08-18 16:24:22 +0100
commit67e0b769ed8d17543e95e93d60e68d06e09d2c12 (patch)
treeed2732d775ccbb468ba77b798eeb3176cb3bb4be /src
parent32888320517cf26ddeb2734885528d28962c0e02 (diff)
downloadrabbitmq-server-git-67e0b769ed8d17543e95e93d60e68d06e09d2c12.tar.gz
By this stage of the client-read, we know a GC can't start and can't be in progress. Thus even if the refcount is 0, we're still safe to read it. What's more, this area of code has never made provision for the index_lookup to return a not_found - it will crash if that happens. Thus if the implicit assumption is that the message must exist, then by the same token, we know the refcount will always be > 0
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_msg_store.erl3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/rabbit_msg_store.erl b/src/rabbit_msg_store.erl
index 5dd11aa75f..dfd96cefd5 100644
--- a/src/rabbit_msg_store.erl
+++ b/src/rabbit_msg_store.erl
@@ -478,8 +478,7 @@ client_read3(Server, #msg_location { guid = Guid, file = File }, Defer,
%% badarg scenario above, but we don't have a missing file
%% - we just have the /wrong/ file).
case index_lookup(Guid, CState) of
- #msg_location { file = File, ref_count = RefCount } =
- MsgLocation when RefCount > 0 ->
+ #msg_location { file = File } = MsgLocation ->
%% Still the same file.
mark_handle_open(FileHandlesEts, File),