Change Riak object hash approach

Change the riak object hash being kept in the metadata, to being a hash
of the vector clock
This commit is contained in:
Martin Sumner 2017-06-16 10:14:24 +01:00
parent 959e7f932f
commit 7642aac2cc
3 changed files with 17 additions and 10 deletions

View file

@ -80,7 +80,7 @@ recovr_strategy(_Config) ->
Q = fun(RT) -> {index_query,
"Bucket6",
{fun testutil:foldkeysfun/3, []},
{"idx1_bin", "#", "~"},
{"idx1_bin", "#", "|"},
{RT, undefined}}
end,
{async, TFolder} = leveled_bookie:book_returnfolder(Book1, Q(true)),
@ -205,8 +205,12 @@ aae_bustedjournal(_Config) ->
% Will need to remove the file or corrupt the hashtree to get presence to
% fail
FoldObjectsFun = fun(B, K, V, Acc) -> [{B, K, erlang:phash2(V)}|Acc]
end,
FoldObjectsFun =
fun(B, K, V, Acc) ->
VC = testutil:get_vclock(V),
H = erlang:phash2(lists:sort(VC)),
[{B, K, H}|Acc]
end,
SW = os:timestamp(),
{async, HashTreeF3} = leveled_bookie:book_returnfolder(Bookie2,
{foldobjects_allkeys,