summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@lshift.net>2010-01-19 16:00:00 +0000
committerMatthew Sackman <matthew@lshift.net>2010-01-19 16:00:00 +0000
commitc28ca505c625bf19da0482432596b790f3618ddb (patch)
treea21f9d1a9225a22b4c5dda7a6c6edddc37ca5340 /src
parentd84e28ac566667bc259c71149d7e151322e713bd (diff)
parent8d1b348f0aad58bbf492603090800d6a15190bb3 (diff)
downloadrabbitmq-server-git-c28ca505c625bf19da0482432596b790f3618ddb.tar.gz
merging in from bug21673
Diffstat (limited to 'src')
-rw-r--r--src/file_handle_cache.erl17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/file_handle_cache.erl b/src/file_handle_cache.erl
index 2519382c19..b289e8427a 100644
--- a/src/file_handle_cache.erl
+++ b/src/file_handle_cache.erl
@@ -88,19 +88,20 @@
%% message and pass it into set_maximum_since_use/1. However, it's
%% highly possible this age will be greater than the ages of all the
%% handles the client knows of because the client has used its file
-%% handles in the mean time. Thus at this point it reports to the
-%% server the current timestamp at which its least recently used file
-%% handle was last used. The server will check two seconds later that
-%% either it's back under the limit, in which case all is well again,
-%% or if not, it will calculate a new average age. Its data will be
-%% much more recent now, and so it's very likely that when this is
-%% communicated to the clients, the clients will close file handles.
+%% handles in the mean time. Thus at this point the client reports to
+%% the server the current timestamp at which its least recently used
+%% file handle was last used. The server will check two seconds later
+%% that either it's back under the limit, in which case all is well
+%% again, or if not, it will calculate a new average age. Its data
+%% will be much more recent now, and so it's very likely that when
+%% this is communicated to the clients, the clients will close file
+%% handles.
%%
%% The advantage of this scheme is that there is only communication
%% from the client to the server on open, close, and when in the
%% process of trying to reduce file handle usage. There is no
%% communication from the client to the server on normal file handle
-%% operations. This scheme forms a feed back loop - the server doesn't
+%% operations. This scheme forms a feed-back loop - the server doesn't
%% care which file handles are closed, just that some are, and it
%% checks this repeatedly when over the limit. Given the guarantees of
%% now(), even if there is just one file handle open, a limit of 1,