summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJean-Sébastien Pédron <jean-sebastien@rabbitmq.com>2015-03-20 10:28:59 +0100
committerJean-Sébastien Pédron <jean-sebastien@rabbitmq.com>2015-03-23 17:50:54 +0100
commit6048843ae9dafa004641400a22990e81a06f70e3 (patch)
tree050c0f124c5aa9438b2917dcbefcb0bab9f11aa7 /src
parent73e12734e799696ce72b735baa7a6daf8bb38118 (diff)
downloadrabbitmq-server-git-6048843ae9dafa004641400a22990e81a06f70e3.tar.gz
file_handle_cache: Remove the "no read buffer" comment in the essay
While here, fix two typos. References #69.
Diffstat (limited to 'src')
-rw-r--r--src/file_handle_cache.erl10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/file_handle_cache.erl b/src/file_handle_cache.erl
index 43e4576494..e539e0ac21 100644
--- a/src/file_handle_cache.erl
+++ b/src/file_handle_cache.erl
@@ -30,9 +30,9 @@
%% may happen, especially for writes.
%% 3) Writes are all appends. You cannot write to the middle of a
%% file, although you can truncate and then append if you want.
-%% 4) Although there is a write buffer, there is no read buffer. Feel
-%% free to use the read_ahead mode, but beware of the interaction
-%% between that buffer and the write buffer.
+%% 4) There are read and write buffers. Feel free to use the read_ahead
+%% mode, but beware of the interaction between that buffer and the write
+%% buffer.
%%
%% Some benefits
%% 1) You do not have to remember to call sync before close
@@ -933,10 +933,10 @@ reset_read_buffer(Handle) ->
%% reading from the buffer - but note that when we seek we reset the
%% buffer, so the first read after a seek will always be a
%% miss. Therefore in that case don't take usage = 0 as meaning the
-%% buffer was usless, we just haven't filled it yet!
+%% buffer was useless, we just haven't filled it yet!
tune_read_buffer_limit(Handle = #handle{read_buffer_usage = 0}) ->
Handle;
-%% In this head we hve been using the buffer but now tried to read
+%% In this head we have been using the buffer but now tried to read
%% outside it. So how did we do? If we used less than the size of the
%% buffer, make the new buffer that size. If we read 100% of what we
%% had, then double it for next time, up to the limit that was set