Shift pause out of leveled
Leveled will now signal the need for a pause due to back-pressure, but not actually pause itself. The hope is that in a riak implementation this pause can be managed by the put_fsm, and so not lock the store.
This commit is contained in:
parent
4583460328
commit
37c23a5b38
4 changed files with 28 additions and 44 deletions
|
@ -36,9 +36,7 @@ simple_put_fetch_head_delete(_Config) ->
|
|||
{ok, Bookie2} = leveled_bookie:book_start(StartOpts2),
|
||||
testutil:check_forobject(Bookie2, TestObject),
|
||||
ObjList1 = testutil:generate_objects(5000, 2),
|
||||
lists:foreach(fun({_RN, Obj, Spc}) ->
|
||||
testutil:book_riakput(Bookie2, Obj, Spc) end,
|
||||
ObjList1),
|
||||
testutil:riakload(Bookie2, ObjList1),
|
||||
ChkList1 = lists:sublist(lists:sort(ObjList1), 100),
|
||||
testutil:check_forlist(Bookie2, ChkList1),
|
||||
testutil:check_forobject(Bookie2, TestObject),
|
||||
|
@ -88,9 +86,7 @@ many_put_fetch_head(_Config) ->
|
|||
ChkListFixed = lists:nth(length(CLs), CLs),
|
||||
testutil:check_forlist(Bookie2, CL1A),
|
||||
ObjList2A = testutil:generate_objects(5000, 2),
|
||||
lists:foreach(fun({_RN, Obj, Spc}) ->
|
||||
testutil:book_riakput(Bookie2, Obj, Spc) end,
|
||||
ObjList2A),
|
||||
testutil:riakload(Bookie2, ObjList2A),
|
||||
ChkList2A = lists:sublist(lists:sort(ObjList2A), 1000),
|
||||
testutil:check_forlist(Bookie2, ChkList2A),
|
||||
testutil:check_forlist(Bookie2, ChkListFixed),
|
||||
|
@ -116,9 +112,7 @@ journal_compaction(_Config) ->
|
|||
ok = testutil:book_riakput(Bookie1, TestObject, TestSpec),
|
||||
testutil:check_forobject(Bookie1, TestObject),
|
||||
ObjList1 = testutil:generate_objects(20000, 2),
|
||||
lists:foreach(fun({_RN, Obj, Spc}) ->
|
||||
testutil:book_riakput(Bookie1, Obj, Spc) end,
|
||||
ObjList1),
|
||||
testutil:riakload(Bookie1, ObjList1),
|
||||
ChkList1 = lists:sublist(lists:sort(ObjList1), 10000),
|
||||
testutil:check_forlist(Bookie1, ChkList1),
|
||||
testutil:check_forobject(Bookie1, TestObject),
|
||||
|
@ -140,18 +134,16 @@ journal_compaction(_Config) ->
|
|||
%% Delete some of the objects
|
||||
ObjListD = testutil:generate_objects(10000, 2),
|
||||
lists:foreach(fun({_R, O, _S}) ->
|
||||
ok = testutil:book_riakdelete(Bookie1,
|
||||
O#r_object.bucket,
|
||||
O#r_object.key,
|
||||
[])
|
||||
testutil:book_riakdelete(Bookie1,
|
||||
O#r_object.bucket,
|
||||
O#r_object.key,
|
||||
[])
|
||||
end,
|
||||
ObjListD),
|
||||
|
||||
%% Now replace all the other objects
|
||||
ObjList2 = testutil:generate_objects(40000, 10002),
|
||||
lists:foreach(fun({_RN, Obj, Spc}) ->
|
||||
testutil:book_riakput(Bookie1, Obj, Spc) end,
|
||||
ObjList2),
|
||||
testutil:riakload(Bookie1, ObjList2),
|
||||
ok = leveled_bookie:book_compactjournal(Bookie1, 30000),
|
||||
|
||||
F = fun leveled_bookie:book_islastcompactionpending/1,
|
||||
|
@ -186,9 +178,7 @@ fetchput_snapshot(_Config) ->
|
|||
{TestObject, TestSpec} = testutil:generate_testobject(),
|
||||
ok = testutil:book_riakput(Bookie1, TestObject, TestSpec),
|
||||
ObjList1 = testutil:generate_objects(5000, 2),
|
||||
lists:foreach(fun({_RN, Obj, Spc}) ->
|
||||
testutil:book_riakput(Bookie1, Obj, Spc) end,
|
||||
ObjList1),
|
||||
testutil:riakload(Bookie1, ObjList1),
|
||||
SnapOpts1 = [{snapshot_bookie, Bookie1}],
|
||||
{ok, SnapBookie1} = leveled_bookie:book_start(SnapOpts1),
|
||||
ChkList1 = lists:sublist(lists:sort(ObjList1), 100),
|
||||
|
@ -211,9 +201,7 @@ fetchput_snapshot(_Config) ->
|
|||
|
||||
|
||||
ObjList2 = testutil:generate_objects(5000, 2),
|
||||
lists:foreach(fun({_RN, Obj, Spc}) ->
|
||||
testutil:book_riakput(Bookie2, Obj, Spc) end,
|
||||
ObjList2),
|
||||
testutil:riakload(Bookie2, ObjList2),
|
||||
io:format("Replacement objects put~n"),
|
||||
|
||||
ChkList2 = lists:sublist(lists:sort(ObjList2), 100),
|
||||
|
@ -225,9 +213,7 @@ fetchput_snapshot(_Config) ->
|
|||
ok = filelib:ensure_dir(RootPath ++ "/ledger/ledger_files"),
|
||||
{ok, FNsA} = file:list_dir(RootPath ++ "/ledger/ledger_files"),
|
||||
ObjList3 = testutil:generate_objects(15000, 5002),
|
||||
lists:foreach(fun({_RN, Obj, Spc}) ->
|
||||
testutil:book_riakput(Bookie2, Obj, Spc) end,
|
||||
ObjList3),
|
||||
testutil:riakload(Bookie2, ObjList3),
|
||||
ChkList3 = lists:sublist(lists:sort(ObjList3), 100),
|
||||
testutil:check_forlist(Bookie2, ChkList3),
|
||||
testutil:check_formissinglist(SnapBookie2, ChkList3),
|
||||
|
@ -461,7 +447,7 @@ space_clear_ondelete(_Config) ->
|
|||
% Delete the keys
|
||||
SW2 = os:timestamp(),
|
||||
lists:foreach(fun({Bucket, Key}) ->
|
||||
ok = testutil:book_riakdelete(Book1,
|
||||
testutil:book_riakdelete(Book1,
|
||||
Bucket,
|
||||
Key,
|
||||
[])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue