Draft of branch to condense range_only keys

This commit is contained in:
martinsumner 2017-03-10 20:43:37 +00:00
parent 730ab2ec48
commit b2f3d882a9
3 changed files with 210 additions and 106 deletions

View file

@ -61,7 +61,8 @@
generate_uuid/0,
integer_now/0,
riak_extract_metadata/2,
magic_hash/1]).
magic_hash/1,
to_lookup/1]).
-define(V1_VERS, 1).
-define(MAGIC, 53). % riak_kv -> riak_object
@ -73,6 +74,14 @@
%% what they are -
%% http://stackoverflow.com/questions/10696223/reason-for-5381-number-in-djb-hash-function
to_lookup(Key) ->
case element(1, Key) of
?IDX_TAG ->
no_lookup;
_ ->
lookup
end.
magic_hash({?RIAK_TAG, Bucket, Key, _SubKey}) ->
magic_hash({Bucket, Key});
magic_hash({?STD_TAG, Bucket, Key, _SubKey}) ->