Expand fold objects support
Fold over bucket and fold over index added
This commit is contained in:
parent
9ea74836ee
commit
68b17c71b3
4 changed files with 100 additions and 22 deletions
|
@ -32,7 +32,8 @@
|
|||
corrupt_journal/5,
|
||||
restore_file/2,
|
||||
restore_topending/2,
|
||||
find_journals/1]).
|
||||
find_journals/1,
|
||||
riak_hash/1]).
|
||||
|
||||
-define(RETURN_TERMS, {true, undefined}).
|
||||
|
||||
|
@ -423,4 +424,13 @@ find_journals(RootPath) ->
|
|||
end,
|
||||
[],
|
||||
FNsA_J),
|
||||
CDBFiles.
|
||||
CDBFiles.
|
||||
|
||||
|
||||
riak_hash(Obj=#r_object{}) ->
|
||||
Vclock = vclock(Obj),
|
||||
UpdObj = set_vclock(Obj, lists:sort(Vclock)),
|
||||
erlang:phash2(term_to_binary(UpdObj)).
|
||||
|
||||
set_vclock(Object=#r_object{}, VClock) -> Object#r_object{vclock=VClock}.
|
||||
vclock(#r_object{vclock=VClock}) -> VClock.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue