Clean API of Riak-specific Methods
Clena the API of Riak specific methods, and also resolve timing issue in simple_server unit test. Previously this would end up with missing data (and a lower sequence number after start) because of the penciller_clerk timeout being relatively large in the context of this test. Now the timeout has bene reduced the L0 slot is cleared by the time of the close. To make sure an extra sleep has been added as a precaution to avoid any intermittent issues.
This commit is contained in:
parent
2d590c3077
commit
4583460328
6 changed files with 124 additions and 103 deletions
|
@ -24,7 +24,7 @@ small_load_with2i(_Config) ->
|
|||
% low journal size to make sure > 1 created
|
||||
{ok, Bookie1} = leveled_bookie:book_start(StartOpts1),
|
||||
{TestObject, TestSpec} = testutil:generate_testobject(),
|
||||
ok = leveled_bookie:book_riakput(Bookie1, TestObject, TestSpec),
|
||||
ok = testutil:book_riakput(Bookie1, TestObject, TestSpec),
|
||||
testutil:check_forobject(Bookie1, TestObject),
|
||||
testutil:check_formissingobject(Bookie1, "Bucket1", "Key2"),
|
||||
testutil:check_forobject(Bookie1, TestObject),
|
||||
|
@ -36,7 +36,7 @@ small_load_with2i(_Config) ->
|
|||
ObjectGen,
|
||||
IndexGen),
|
||||
lists:foreach(fun({_RN, Obj, Spc}) ->
|
||||
leveled_bookie:book_riakput(Bookie1, Obj, Spc) end,
|
||||
testutil:book_riakput(Bookie1, Obj, Spc) end,
|
||||
ObjL1),
|
||||
ChkList1 = lists:sublist(lists:sort(ObjL1), 100),
|
||||
testutil:check_forlist(Bookie1, ChkList1),
|
||||
|
@ -48,7 +48,7 @@ small_load_with2i(_Config) ->
|
|||
end,
|
||||
Spc),
|
||||
{B, K} = leveled_codec:riakto_keydetails(Obj),
|
||||
leveled_bookie:book_riakdelete(Bookie1, B, K, DSpc)
|
||||
testutil:book_riakdelete(Bookie1, B, K, DSpc)
|
||||
end,
|
||||
ChkList1),
|
||||
%% Get the Buckets Keys and Hashes for the whole bucket
|
||||
|
@ -116,7 +116,7 @@ query_count(_Config) ->
|
|||
"Value1",
|
||||
[],
|
||||
{"MDK1", "MDV1"}),
|
||||
ok = leveled_bookie:book_riakput(Book1, TestObject, TestSpec),
|
||||
ok = testutil:book_riakput(Book1, TestObject, TestSpec),
|
||||
testutil:check_forobject(Book1, TestObject),
|
||||
testutil:check_formissingobject(Book1, "Bucket1", "Key2"),
|
||||
testutil:check_forobject(Book1, TestObject),
|
||||
|
@ -130,7 +130,7 @@ query_count(_Config) ->
|
|||
V,
|
||||
Indexes),
|
||||
lists:foreach(fun({_RN, Obj, Spc}) ->
|
||||
leveled_bookie:book_riakput(Book1,
|
||||
testutil:book_riakput(Book1,
|
||||
Obj,
|
||||
Spc)
|
||||
end,
|
||||
|
@ -243,7 +243,7 @@ query_count(_Config) ->
|
|||
V9 = testutil:get_compressiblevalue(),
|
||||
Indexes9 = testutil:get_randomindexes_generator(8),
|
||||
[{_RN, Obj9, Spc9}] = testutil:generate_objects(1, uuid, [], V9, Indexes9),
|
||||
ok = leveled_bookie:book_riakput(Book2, Obj9, Spc9),
|
||||
ok = testutil:book_riakput(Book2, Obj9, Spc9),
|
||||
R9 = lists:map(fun({add, IdxF, IdxT}) ->
|
||||
R = leveled_bookie:book_returnfolder(Book2,
|
||||
{index_query,
|
||||
|
@ -261,7 +261,7 @@ query_count(_Config) ->
|
|||
Spc9),
|
||||
Spc9Del = lists:map(fun({add, IdxF, IdxT}) -> {remove, IdxF, IdxT} end,
|
||||
Spc9),
|
||||
ok = leveled_bookie:book_riakput(Book2, Obj9, Spc9Del),
|
||||
ok = testutil:book_riakput(Book2, Obj9, Spc9Del),
|
||||
lists:foreach(fun({IdxF, IdxT, X}) ->
|
||||
R = leveled_bookie:book_returnfolder(Book2,
|
||||
{index_query,
|
||||
|
@ -294,7 +294,7 @@ query_count(_Config) ->
|
|||
end
|
||||
end,
|
||||
R9),
|
||||
ok = leveled_bookie:book_riakput(Book3, Obj9, Spc9),
|
||||
ok = testutil:book_riakput(Book3, Obj9, Spc9),
|
||||
ok = leveled_bookie:book_close(Book3),
|
||||
{ok, Book4} = leveled_bookie:book_start(RootPath, 2000, 50000000),
|
||||
lists:foreach(fun({IdxF, IdxT, X}) ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue