diff options
author | Tim Watson <tim@rabbitmq.com> | 2012-07-27 14:23:19 +0100 |
---|---|---|
committer | Tim Watson <tim@rabbitmq.com> | 2012-07-27 14:23:19 +0100 |
commit | 0913032f93991e33b6d017232cb87aec85fe14ba (patch) | |
tree | e029a440857bf56563b92b863b1ae92f95ba3598 | |
parent | 8118ab1eaf1c80758b4204cae85c81ff38ab598b (diff) | |
download | rabbitmq-server-0913032f93991e33b6d017232cb87aec85fe14ba.tar.gz |
Backport ef69a3788285 (Merge of bug25052; Large numbers of queues -> 100% CPU usage)
-rw-r--r-- | src/file_handle_cache.erl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/file_handle_cache.erl b/src/file_handle_cache.erl index f3b4dbaf..13ee4249 100644 --- a/src/file_handle_cache.erl +++ b/src/file_handle_cache.erl @@ -374,11 +374,11 @@ sync(Ref) -> end). needs_sync(Ref) -> - with_handles( - [Ref], - fun ([#handle { is_dirty = false, write_buffer = [] }]) -> false; - ([_Handle]) -> true - end). + %% This must *not* use with_handles/2; see bug 25052 + case get({Ref, fhc_handle}) of + #handle { is_dirty = false, write_buffer = [] } -> false; + #handle {} -> true + end. position(Ref, NewOffset) -> with_flushed_handles( |