summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 1d679215fb..573f33d39d 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