From ac2c5caeff1003fd6ab7c4f011a498451491c00d Mon Sep 17 00:00:00 2001 From: Gregory Burd Date: Wed, 30 Oct 2013 11:50:20 -0400 Subject: [PATCH] Change a few default configs and comment out the stats gathering for now. --- src/riak_kv_wterl_backend.erl | 54 +++++++++++++++++------------------ 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/src/riak_kv_wterl_backend.erl b/src/riak_kv_wterl_backend.erl index 82682b9..9d9c3eb 100644 --- a/src/riak_kv_wterl_backend.erl +++ b/src/riak_kv_wterl_backend.erl @@ -120,9 +120,6 @@ start(Partition, Config) -> [{internal_page_max, "128K"}, {leaf_page_max, "16K"}, {lsm_chunk_size, "100MB"}, - {lsm_merge_threads, 2}, - {prefix_compression, true}, - {lsm_bloom_newest, true}, {lsm_bloom_oldest, true} , {lsm_bloom_bit_count, 28}, {lsm_bloom_hash_count, 19}, @@ -341,22 +338,23 @@ is_empty(#state{connection=Connection, table=Table}) -> %% @doc Get the status information for this wterl backend -spec status(state()) -> [{atom(), term()}]. status(#state{connection=Connection, table=Table}) -> - case wterl:cursor_open(Connection, "statistics:" ++ Table, [{statistics_fast, true}]) of - {ok, Cursor} -> - TheStats = - case fetch_status(Cursor) of - {ok, Stats} -> - Stats; - {error, {eperm, _}} -> % TODO: review/fix this logic - {ok, []}; - _ -> - {ok, []} - end, - wterl:cursor_close(Cursor), - TheStats; - {error, Reason2} -> - {error, Reason2} - end. + []. +%% case wterl:cursor_open(Connection, "statistics:" ++ Table, [{statistics_fast, true}]) of +%% {ok, Cursor} -> +%% TheStats = +%% case fetch_status(Cursor) of +%% {ok, Stats} -> +%% Stats; +%% {error, {eperm, _}} -> % TODO: review/fix this logic +%% {ok, []}; +%% _ -> +%% {ok, []} +%% end, +%% wterl:cursor_close(Cursor), +%% TheStats; +%% {error, Reason2} -> +%% {error, Reason2} +%% end. %% @doc Register an asynchronous callback -spec callback(reference(), any(), state()) -> {ok, state()}. @@ -543,15 +541,15 @@ from_index_key(LKey) -> %% @private %% Return all status from wterl statistics cursor -fetch_status(Cursor) -> - {ok, fetch_status(Cursor, wterl:cursor_next_value(Cursor), [])}. -fetch_status(_Cursor, {error, _}, Acc) -> - lists:reverse(Acc); -fetch_status(_Cursor, not_found, Acc) -> - lists:reverse(Acc); -fetch_status(Cursor, {ok, Stat}, Acc) -> - [What,Val|_] = [binary_to_list(B) || B <- binary:split(Stat, [<<0>>], [global])], - fetch_status(Cursor, wterl:cursor_next_value(Cursor), [{What,Val}|Acc]). +%% fetch_status(Cursor) -> +%% {ok, fetch_status(Cursor, wterl:cursor_next_value(Cursor), [])}. +%% fetch_status(_Cursor, {error, _}, Acc) -> +%% lists:reverse(Acc); +%% fetch_status(_Cursor, not_found, Acc) -> +%% lists:reverse(Acc); +%% fetch_status(Cursor, {ok, Stat}, Acc) -> +%% [What,Val|_] = [binary_to_list(B) || B <- binary:split(Stat, [<<0>>], [global])], +%% fetch_status(Cursor, wterl:cursor_next_value(Cursor), [{What,Val}|Acc]). size_cache(RequestedSize) -> Size =