summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@rabbitmq.com>2011-01-10 11:51:07 +0000
committerMatthew Sackman <matthew@rabbitmq.com>2011-01-10 11:51:07 +0000
commit005a15ad8e4abf67e45647ff48cf399c57af96e9 (patch)
tree6ea6ad96a5020b12294f1e1e7006ad1ba07e4bb7
parentaaccad180a7d5af38d61b23667264a6d2f3060d0 (diff)
downloadrabbitmq-server-005a15ad8e4abf67e45647ff48cf399c57af96e9.tar.gz
Correction and improvements of comments
-rw-r--r--src/rabbit_msg_store.erl7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/rabbit_msg_store.erl b/src/rabbit_msg_store.erl
index 1d679215..573f33d3 100644
--- a/src/rabbit_msg_store.erl
+++ b/src/rabbit_msg_store.erl
@@ -689,6 +689,11 @@ handle_call({contains, Guid}, From, State) ->
handle_cast({client_dying, CRef},
State = #msstate { dying_clients_ets = DyingClientsEts }) ->
+ %% Note that we use a separate set for the dying clients in order
+ %% to keep that set, which is inspected on every write and remove,
+ %% as small as possible - inspecting the set of all clients would
+ %% degrade performance with many healthy clients and few dying
+ %% clients.
true = ets:insert_new(DyingClientsEts, {CRef, const}),
write_message(CRef, <<>>, State);
@@ -1115,7 +1120,7 @@ client_confirm(CRef, Guids, ActionTaken,
%% Detect whether the Guid is older or younger than the client's death
%% msg (if there is one). If the msg is older than the client death
-%% msg, and it has a 0 ref_count we must only alter the ref_count it,
+%% msg, and it has a 0 ref_count we must only alter the ref_count,
%% not rewrite the msg - rewriting it would make it younger than the
%% death msg and thus should be ignored. Note that this will
%% (correctly) return false when testing to remove the death msg