diff options
author | Matthew Sackman <matthew@lshift.net> | 2010-02-18 14:47:56 +0000 |
---|---|---|
committer | Matthew Sackman <matthew@lshift.net> | 2010-02-18 14:47:56 +0000 |
commit | b4d1298e8f5aa3d9ba1b4190bb42a6bf58afa6e7 (patch) | |
tree | 46e7a8802decce1cedf6d52c7afb66b8e495398e /src/rabbit_msg_store_gc.erl | |
parent | e627677ba905290000bea08eef1ebf98832f47f2 (diff) | |
download | rabbitmq-server-b4d1298e8f5aa3d9ba1b4190bb42a6bf58afa6e7.tar.gz |
Several fixes:
1. Both the msg_store and the amqqueue_process can have their mailboxes get very long. In this case, it's a problem because close messages from the FHC can't get through (Plain !, and no priority). Therefore, add callbacks registry to FHC and equip both msg_store and amqqueue_process with high priority casts to solve this problem (ftr, msg_store can get swamped with writes, whilst the amqqueue_process can get swamped with delivery notifications and acks).
2. The GC was missing the ability to deal with close msgs from the FHC
3. The FHC, when reopening a file, uses the same mode as the file was originally opened with. If that mode is just write, then when the file is reopened, its contents get trashed. Thus when reopening, add in read to the mode, but don't record this anywhere - the file still acts (API wise) as if it was only opened writable.
Diffstat (limited to 'src/rabbit_msg_store_gc.erl')
-rw-r--r-- | src/rabbit_msg_store_gc.erl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rabbit_msg_store_gc.erl b/src/rabbit_msg_store_gc.erl index 6023de02..a64733df 100644 --- a/src/rabbit_msg_store_gc.erl +++ b/src/rabbit_msg_store_gc.erl @@ -77,6 +77,10 @@ handle_cast({gc, Source, Destination}, State) -> ok = rabbit_msg_store:gc_done(Reclaimed, Source, Destination), {noreply, State, hibernate}. +handle_info({file_handle_cache, maximum_eldest_since_use, Age}, State) -> + ok = file_handle_cache:set_maximum_since_use(Age), + {noreply, State, hibernate}; + handle_info(Info, State) -> {stop, {unhandled_info, Info}, State}. |