Skip to content

Commit

Permalink
Merge pull request #1697 from martinsumner/mas-i939-reviewrebuilds
Browse files Browse the repository at this point in the history
Mas i939 reviewrebuilds
  • Loading branch information
martinsumner authored May 11, 2019
2 parents e6c47b4 + ce7bd10 commit d606fcd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions src/riak_kv_vnode.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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().
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/riak_kv_wm_aaefold.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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
}).
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit d606fcd

Please sign in to comment.