diff options
| author | Matthew Sackman <matthew@rabbitmq.com> | 2011-01-10 11:51:07 +0000 |
|---|---|---|
| committer | Matthew Sackman <matthew@rabbitmq.com> | 2011-01-10 11:51:07 +0000 |
| commit | cc0fd0b7698cc79ac6bd1074c9addfcd90e14f06 (patch) | |
| tree | 6ea6ad96a5020b12294f1e1e7006ad1ba07e4bb7 /src | |
| parent | 21068eb16a23bc31cb8c20aba7a2744cfaf3f722 (diff) | |
| download | rabbitmq-server-git-cc0fd0b7698cc79ac6bd1074c9addfcd90e14f06.tar.gz | |
Correction and improvements of comments
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_msg_store.erl | 7 |
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 |
