Isolate better changes needed to support changes to metadata extraction
More obvious how to extend the code as it is all in one module. Also add a new field to the standard object metadata tuple that may hold in the future other object metadata base don user-defined functions.
This commit is contained in:
parent
bfddb53e31
commit
881b93229b
7 changed files with 322 additions and 213 deletions
|
@ -69,9 +69,9 @@ simple_test_withlog(LogLevel, ForcedLogs) ->
|
|||
ok = leveled_bookie:book_put(Bookie2, "Bucket1", "Key2", "Value2",
|
||||
[{add, "Index1", "Term1"}]),
|
||||
{ok, "Value2"} = leveled_bookie:book_get(Bookie2, "Bucket1", "Key2"),
|
||||
{ok, {62888926, 60}} = leveled_bookie:book_head(Bookie2,
|
||||
"Bucket1",
|
||||
"Key2"),
|
||||
{ok, {62888926, 60, undefined}} = leveled_bookie:book_head(Bookie2,
|
||||
"Bucket1",
|
||||
"Key2"),
|
||||
testutil:check_formissingobject(Bookie2, "Bucket1", "Key2"),
|
||||
ok = leveled_bookie:book_put(Bookie2, "Bucket1", "Key2", <<"Value2">>,
|
||||
[{remove, "Index1", "Term1"},
|
||||
|
|
|
@ -363,7 +363,7 @@ check_forobject(Bookie, TestObject) ->
|
|||
TestObject#r_object.bucket,
|
||||
TestObject#r_object.key),
|
||||
{{_SibMetaBin, Vclock, _Hash, size}, _LMS}
|
||||
= leveled_codec:riak_extract_metadata(HeadBinary, size),
|
||||
= leveled_head:riak_extract_metadata(HeadBinary, size),
|
||||
true = binary_to_term(Vclock) == TestObject#r_object.vclock.
|
||||
|
||||
check_formissingobject(Bookie, Bucket, Key) ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue