From be95229af94118faa3fa88c67dd963789cfe68a9 Mon Sep 17 00:00:00 2001 From: Gregory Burd Date: Fri, 19 Apr 2013 16:44:51 -0400 Subject: [PATCH] On error when fetching stats, ignore and return whatever you have so far. --- src/riak_kv_wterl_backend.erl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/riak_kv_wterl_backend.erl b/src/riak_kv_wterl_backend.erl index 3f14d2f..52bf28e 100644 --- a/src/riak_kv_wterl_backend.erl +++ b/src/riak_kv_wterl_backend.erl @@ -545,6 +545,8 @@ from_index_key(LKey) -> %% 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) ->