Test sst slot configuration change
Confirm it results in many more files, if the slot count reduced. Has to handle the fact that Level 0 file has unlimited slots regardless of number of slots configured
This commit is contained in:
parent
ae9b03ab3c
commit
8f6862a10b
1 changed files with 45 additions and 10 deletions
|
@ -12,21 +12,23 @@
|
|||
is_empty_test/1,
|
||||
many_put_fetch_switchcompression/1,
|
||||
bigjournal_littlejournal/1,
|
||||
bigsst_littlesst/1,
|
||||
safereaderror_startup/1,
|
||||
remove_journal_test/1
|
||||
]).
|
||||
|
||||
all() -> [
|
||||
simple_put_fetch_head_delete,
|
||||
many_put_fetch_head,
|
||||
journal_compaction,
|
||||
fetchput_snapshot,
|
||||
load_and_count,
|
||||
load_and_count_withdelete,
|
||||
space_clear_ondelete,
|
||||
is_empty_test,
|
||||
many_put_fetch_switchcompression,
|
||||
bigjournal_littlejournal,
|
||||
% simple_put_fetch_head_delete,
|
||||
% many_put_fetch_head,
|
||||
% journal_compaction,
|
||||
% fetchput_snapshot,
|
||||
% load_and_count,
|
||||
% load_and_count_withdelete,
|
||||
% space_clear_ondelete,
|
||||
% is_empty_test,
|
||||
% many_put_fetch_switchcompression,
|
||||
% bigjournal_littlejournal,
|
||||
bigsst_littlesst,
|
||||
safereaderror_startup,
|
||||
remove_journal_test
|
||||
].
|
||||
|
@ -164,6 +166,39 @@ bigjournal_littlejournal(_Config) ->
|
|||
ok = leveled_bookie:book_destroy(Bookie2).
|
||||
|
||||
|
||||
bigsst_littlesst(_Config) ->
|
||||
RootPath = testutil:reset_filestructure(),
|
||||
StartOpts1 = [{root_path, RootPath},
|
||||
{max_journalsize, 50000000},
|
||||
{cache_size, 1000},
|
||||
{max_pencillercachesize, 16000},
|
||||
{max_sstslots, 256},
|
||||
{sync_strategy, testutil:sync_strategy()},
|
||||
{compression_point, on_compact}],
|
||||
{ok, Bookie1} = leveled_bookie:book_start(StartOpts1),
|
||||
ObjL1 =
|
||||
testutil:generate_objects(60000, 1, [],
|
||||
leveled_rand:rand_bytes(100),
|
||||
fun() -> [] end, <<"B">>),
|
||||
testutil:riakload(Bookie1, ObjL1),
|
||||
testutil:check_forlist(Bookie1, ObjL1),
|
||||
JFP = RootPath ++ "/ledger/ledger_files/",
|
||||
{ok, FNS1} = file:list_dir(JFP),
|
||||
ok = leveled_bookie:book_destroy(Bookie1),
|
||||
|
||||
|
||||
StartOpts2 = lists:ukeysort(1, [{max_sstslots, 24}|StartOpts1]),
|
||||
{ok, Bookie2} = leveled_bookie:book_start(StartOpts2),
|
||||
testutil:riakload(Bookie2, ObjL1),
|
||||
testutil:check_forlist(Bookie2, ObjL1),
|
||||
{ok, FNS2} = file:list_dir(JFP),
|
||||
ok = leveled_bookie:book_destroy(Bookie2),
|
||||
io:format("Big SST ~w files Little SST ~w files~n",
|
||||
[length(FNS1), length(FNS2)]),
|
||||
true = length(FNS2) > (2 * length(FNS1)).
|
||||
|
||||
|
||||
|
||||
journal_compaction(_Config) ->
|
||||
journal_compaction_tester(false, 3600),
|
||||
journal_compaction_tester(false, undefined),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue