diff options
| author | Matthew Sackman <matthew@lshift.net> | 2009-10-14 17:25:48 +0100 |
|---|---|---|
| committer | Matthew Sackman <matthew@lshift.net> | 2009-10-14 17:25:48 +0100 |
| commit | 51edc03f72c6b826bc4b46a24acf5f7abf8582b9 (patch) | |
| tree | e9620e447f4b23b50ca6030b8809c2946d52fd3e /src | |
| parent | cc86d0f3ff7de862626f7a55d9de30f3a5969470 (diff) | |
| download | rabbitmq-server-git-51edc03f72c6b826bc4b46a24acf5f7abf8582b9.tar.gz | |
some more fixes. durable queue recovery seems to work
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_queue_index.erl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rabbit_queue_index.erl b/src/rabbit_queue_index.erl index b58c5a7f6f..4f283e42c7 100644 --- a/src/rabbit_queue_index.erl +++ b/src/rabbit_queue_index.erl @@ -80,7 +80,7 @@ -define(SEGMENT_EXTENSION, ".idx"). -define(REL_SEQ_BITS, 14). --define(REL_SEQ_BITS_BYTE_ALIGNED, (?REL_SEQ_BITS + (?REL_SEQ_BITS rem 8))). +-define(REL_SEQ_BITS_BYTE_ALIGNED, (?REL_SEQ_BITS + 8 - (?REL_SEQ_BITS rem 8))). -define(SEGMENT_ENTRIES_COUNT, 16384). %% trunc(math:pow(2,?REL_SEQ_BITS))). %% seq only is binary 00 followed by 14 bits of rel seq id @@ -336,10 +336,10 @@ start_msg_store() -> %%---------------------------------------------------------------------------- queue_name_to_dir_name(Name = #resource { kind = queue }) -> - lists:map(fun ($/) -> $_; - ($+) -> $-; - (C) -> C - end, ssl_base64:encode(term_to_binary(Name))). + Bin = term_to_binary(Name), + Size = 8*size(Bin), + <<Num:Size>> = Bin, + hd(io_lib:format("~.36B", [Num])). queues_dir() -> filename:join(rabbit_mnesia:dir(), "queues"). |
