diff options
| author | Matthew Sackman <matthew@lshift.net> | 2010-01-14 00:47:22 +0000 |
|---|---|---|
| committer | Matthew Sackman <matthew@lshift.net> | 2010-01-14 00:47:22 +0000 |
| commit | 52e495c11e490002327a4c728c86d4f0cef936a6 (patch) | |
| tree | 3b868dc29b9983dc91b2acdd70a90ce611b1c778 | |
| parent | 0e4c51443bc8b40f3e83db85e01c26604053263d (diff) | |
| download | rabbitmq-server-git-52e495c11e490002327a4c728c86d4f0cef936a6.tar.gz | |
Should actually be working on the ratio of betas to betas+alphas. Thus subtract out deltacount
| -rw-r--r-- | src/rabbit_variable_queue.erl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rabbit_variable_queue.erl b/src/rabbit_variable_queue.erl index 6b45866220..2c00c4da07 100644 --- a/src/rabbit_variable_queue.erl +++ b/src/rabbit_variable_queue.erl @@ -585,13 +585,14 @@ beta_fold_no_index_on_disk(Fun, Init, Q) -> permitted_ram_index_count(#vqstate { len = 0 }) -> undefined; -permitted_ram_index_count(#vqstate { len = Len, q2 = Q2, q3 = Q3 }) -> +permitted_ram_index_count(#vqstate { len = Len, q2 = Q2, q3 = Q3, + delta = #delta { count = DeltaCount } }) -> case bpqueue:len(Q2) + bpqueue:len(Q3) of 0 -> undefined; BetaLength -> %% the fraction of the queue that are betas - BetaFrac = BetaLength / Len, + BetaFrac = BetaLength / (Len - DeltaCount), BetaLength - trunc(BetaFrac * BetaLength) end. |
