Remove rocksdb opts refault, safer index consistency check

This commit is contained in:
Ulf Wiger 2022-07-22 15:31:55 +02:00
parent c4235be94a
commit 7057f4dcbd
2 changed files with 3 additions and 13 deletions

View File

@ -1,11 +1,4 @@
%% -*- erlang-mode -*- %% -*- erlang-mode -*-
case os:getenv("ERLANG_ROCKSDB_OPTS") of
false ->
true = os:putenv("ERLANG_ROCKSDB_OPTS", "-DWITH_BUNDLE_LZ4=ON");
_ ->
%% If manually set, we assume it's throught through
skip
end.
case os:getenv("DEBUG") of case os:getenv("DEBUG") of
"true" -> "true" ->
Opts = proplists:get_value(erl_opts, CONFIG, []), Opts = proplists:get_value(erl_opts, CONFIG, []),

View File

@ -346,14 +346,11 @@ semantics(_Alias, index_fun) -> fun index_f/4;
semantics(_Alias, _) -> undefined. semantics(_Alias, _) -> undefined.
is_index_consistent(Alias, {Tab, index, PosInfo}) -> is_index_consistent(Alias, {Tab, index, PosInfo}) ->
case info(Alias, Tab, {index_consistent, PosInfo}) of mnesia_rocksdb_admin:read_info(Alias, Tab, {index_consistent, PosInfo}, false).
true -> true;
_ -> false
end.
index_is_consistent(_Alias, {Tab, index, PosInfo}, Bool) index_is_consistent(Alias, {Tab, index, PosInfo}, Bool)
when is_boolean(Bool) -> when is_boolean(Bool) ->
mrdb:write_info(Tab, {index_consistent, PosInfo}, Bool). mnesia_rocksdb_admin:write_info(Alias, Tab, {index_consistent, PosInfo}, Bool).
%% PRIVATE FUN %% PRIVATE FUN