diff options
| author | Matthew Sackman <matthew@lshift.net> | 2009-04-13 00:14:07 +0100 |
|---|---|---|
| committer | Matthew Sackman <matthew@lshift.net> | 2009-04-13 00:14:07 +0100 |
| commit | 6c07f9ea03541625f9113691a086165b4f44ca42 (patch) | |
| tree | f71fd060cd8af708b676e6844cda00a94cd50e35 /src | |
| parent | 4a6d328ff71764207186b355500d02b7a0d626e8 (diff) | |
| download | rabbitmq-server-git-6c07f9ea03541625f9113691a086165b4f44ca42.tar.gz | |
tiny change to fix where the badmatch happens.
Must be a bug in compaction as it would appear messages are being deleted early.
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_disk_queue.erl | 2 | ||||
| -rw-r--r-- | src/rabbit_tests.erl | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/rabbit_disk_queue.erl b/src/rabbit_disk_queue.erl index 869ed841c9..3527fd2aeb 100644 --- a/src/rabbit_disk_queue.erl +++ b/src/rabbit_disk_queue.erl @@ -384,7 +384,7 @@ load_from_disk(State) -> % There should be no more tmp files now, so go ahead and load the whole lot (State1 = #dqstate{ msg_location = MsgLocation }) = load_messages(undefined, Files, State), % Finally, check there is nothing in mnesia which we haven't loaded - true = lists:foldl(fun ({MsgId, _Q}, true) -> 1 =:= length(ets:lookup(MsgLocation, MsgId)) end, + true = lists:foldl(fun ({MsgId, _Q}, true) -> true = 1 =:= length(ets:lookup(MsgLocation, MsgId)) end, true, mnesia:dirty_all_keys(rabbit_disk_queue)), {ok, State1}. diff --git a/src/rabbit_tests.erl b/src/rabbit_tests.erl index a9f546dc99..89c575bfbd 100644 --- a/src/rabbit_tests.erl +++ b/src/rabbit_tests.erl @@ -627,9 +627,9 @@ delete_log_handlers(Handlers) -> test_disk_queue() -> [begin rdq_time_tx_publish_commit_deliver_ack(Qs, MsgCount, MsgSize), timer:sleep(1000) end || % 1000 milliseconds - MsgSize <- [128, 512, 2048, 8192, 32768, 131072], - Qs <- [[1], lists:seq(1,10), lists:seq(1,100), lists:seq(1,1000)], - MsgCount <- [1024, 2048, 4096, 8192, 16384] + MsgSize <- [512, 8192, 32768, 131072], + Qs <- [[1], lists:seq(1,10)], %, lists:seq(1,100), lists:seq(1,1000)], + MsgCount <- [1024, 4096, 16384] ], rdq_virgin(), passed. |
