Compare commits
No commits in common. "318f84bbafe8cb022a1a0b40c7fc55de2d9cdbac" and "ac69c8564f273e8d9d4c923fdddd376f545bc341" have entirely different histories.
318f84bbaf
...
ac69c8564f
@ -1496,7 +1496,7 @@ open_db_(MP, Alias, Opts, CFs0, CreateIfMissing) ->
|
|||||||
true ->
|
true ->
|
||||||
%% Assumption: even an old rocksdb database file will have at least "default"
|
%% Assumption: even an old rocksdb database file will have at least "default"
|
||||||
{ok,CFs} = rocksdb:list_column_families(MP, Opts),
|
{ok,CFs} = rocksdb:list_column_families(MP, Opts),
|
||||||
CFs1 = [{CF, cfopts()} || CF <- CFs], %% TODO: this really needs more checking
|
CFs1 = [{CF,[]} || CF <- CFs], %% TODO: this really needs more checking
|
||||||
map_cfs(rocksdb_open(MP, Opts, CFs1), CFs1, Alias, Acc0)
|
map_cfs(rocksdb_open(MP, Opts, CFs1), CFs1, Alias, Acc0)
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
@ -27,9 +27,6 @@
|
|||||||
, mrdb_two_procs_tx_inner_restart/1
|
, mrdb_two_procs_tx_inner_restart/1
|
||||||
, mrdb_two_procs_snap/1
|
, mrdb_two_procs_snap/1
|
||||||
, mrdb_three_procs/1
|
, mrdb_three_procs/1
|
||||||
, create_counters/1
|
|
||||||
, update_counters/1
|
|
||||||
, restart_node/1
|
|
||||||
]).
|
]).
|
||||||
|
|
||||||
-include_lib("common_test/include/ct.hrl").
|
-include_lib("common_test/include/ct.hrl").
|
||||||
@ -45,8 +42,7 @@ all() ->
|
|||||||
groups() ->
|
groups() ->
|
||||||
[
|
[
|
||||||
{all_tests, [sequence], [ {group, checks}
|
{all_tests, [sequence], [ {group, checks}
|
||||||
, {group, mrdb}
|
, {group, mrdb} ]}
|
||||||
, {group, counters}]}
|
|
||||||
%% , error_handling ]}
|
%% , error_handling ]}
|
||||||
, {checks, [sequence], [ encoding_sext_attrs
|
, {checks, [sequence], [ encoding_sext_attrs
|
||||||
, encoding_binary_binary
|
, encoding_binary_binary
|
||||||
@ -61,10 +57,6 @@ groups() ->
|
|||||||
, mrdb_two_procs_tx_inner_restart
|
, mrdb_two_procs_tx_inner_restart
|
||||||
, mrdb_two_procs_snap
|
, mrdb_two_procs_snap
|
||||||
, mrdb_three_procs ]}
|
, mrdb_three_procs ]}
|
||||||
, {counters, [sequence], [ create_counters
|
|
||||||
, update_counters
|
|
||||||
, restart_node
|
|
||||||
, update_counters ]}
|
|
||||||
].
|
].
|
||||||
|
|
||||||
|
|
||||||
@ -757,35 +749,6 @@ get_attempt() ->
|
|||||||
#{activity := #{attempt := Attempt}} = mrdb:current_context(),
|
#{activity := #{attempt := Attempt}} = mrdb:current_context(),
|
||||||
Attempt.
|
Attempt.
|
||||||
|
|
||||||
create_counters(_Config) ->
|
|
||||||
create_tab(counters, []),
|
|
||||||
mrdb:insert(counters, {counters, c0, 1}),
|
|
||||||
mrdb:update_counter(counters, c1, 1),
|
|
||||||
[{counters, c0, 1}] = mrdb:read(counters, c0),
|
|
||||||
[{counters, c1, 1}] = mrdb:read(counters, c1),
|
|
||||||
ct:log("Created tab counters, with objs c0 (1) and c1 (1)", []),
|
|
||||||
ok.
|
|
||||||
|
|
||||||
restart_node(_Config) ->
|
|
||||||
mnesia:stop(),
|
|
||||||
ok = mnesia:start(),
|
|
||||||
ct:log("mnesia restarted", []),
|
|
||||||
ok.
|
|
||||||
|
|
||||||
update_counters(_Config) ->
|
|
||||||
[{counters, c0, C0Prev}] = mrdb:read(counters, c0),
|
|
||||||
[{counters, c1, C1Prev}] = mrdb:read(counters, c1),
|
|
||||||
ct:log("co: ~p, c1: ~p", [C0Prev, C1Prev]),
|
|
||||||
ok = mrdb:update_counter(counters, c0, 1),
|
|
||||||
ok = mrdb:update_counter(counters, c1, 1),
|
|
||||||
ct:log("Incremented c0 and c1 by 1", []),
|
|
||||||
C0 = C0Prev + 1,
|
|
||||||
C1 = C1Prev + 1,
|
|
||||||
[{counters, c0, C0}] = mrdb:read(counters, c0),
|
|
||||||
[{counters, c1, C1}] = mrdb:read(counters, c1),
|
|
||||||
ct:log("c0: ~p, c1: ~p", [C0, C1]),
|
|
||||||
ok.
|
|
||||||
|
|
||||||
create_tabs(Tabs, Config) ->
|
create_tabs(Tabs, Config) ->
|
||||||
Res = lists:map(fun create_tab/1, Tabs),
|
Res = lists:map(fun create_tab/1, Tabs),
|
||||||
tr_ct:trace_checkpoint(?TABS_CREATED, Config),
|
tr_ct:trace_checkpoint(?TABS_CREATED, Config),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user