diff --git a/src/riak_kv_vnode.erl b/src/riak_kv_vnode.erl index d27d3ee1e7..52011b953d 100644 --- a/src/riak_kv_vnode.erl +++ b/src/riak_kv_vnode.erl @@ -422,14 +422,14 @@ tictac_returnfun(Partition, RebuildType) -> ReturnFun. --spec tictac_rebuild(binary(), binary(), riak_object:riak_object()) -> +-spec tictac_rebuild(binary(), binary(), binary()) -> {riak_kv_util:index_n(), vclock:vclock()}. %% @doc %% Return a function that takes [B, K, v] as arguements and converts that into %% a {Preflist, Clock} output tictac_rebuild(B, K, V) -> IndexN = preflistfun(B, K), - Clock = riak_object:vclock(V), + Clock = element(1, riak_object:summary_from_binary(V)), {IndexN, Clock}. -spec rebuildtrees_workerfun(partition(), state()) -> fun(). @@ -1513,7 +1513,11 @@ handle_coverage_aaefold(Query, InitAcc, Nval, end, handle_aaefold(Query, InitAcc, Nval, IndexNs, Filtered, ReturnFun, Cntrl, Sender, - State). + State); +handle_coverage_aaefold(_Q, InitAcc, _Nval, _Filter, Sender, State) -> + lager:warning("Attempt to aaefold on vnode with Tictac AAE disabled"), + riak_core_vnode:reply(Sender, InitAcc), + {noreply, State}. handle_aaefold({merge_root_nval, Nval}, _InitAcc, Nval, diff --git a/src/riak_kv_wm_aaefold.erl b/src/riak_kv_wm_aaefold.erl index 5706a6b365..4e20c036f8 100644 --- a/src/riak_kv_wm_aaefold.erl +++ b/src/riak_kv_wm_aaefold.erl @@ -118,7 +118,7 @@ %% some values used for some queries. -record(filter, { key_range = all :: {binary(), binary()} | all, - date_range = all :: {pos_integer(), pos_integer()} | all, + date_range = all :: {date, pos_integer(), pos_integer()} | all, hash_method = pre_hash :: {rehash, non_neg_integer()} | pre_hash, segment_filter = all :: {segments, list(pos_integer()), leveled_tictac:tree_size()} | all }). @@ -541,7 +541,7 @@ validate_filter_field(?DATE_RANGE, {struct, DateRangeJson}, Filter) -> is_integer(End), Start >= 0, End >= 0 -> - {valid, Filter#filter{date_range= {Start, End}}}; + {valid, Filter#filter{date_range= {date, Start, End}}}; Other -> {invalid, {?DATE_RANGE, Other}} end;