-
Notifications
You must be signed in to change notification settings - Fork 429
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4136 from esl/cets-for-cluster-id-v3
CETS backend for mongoose_cluster_id (minimal logic)
- Loading branch information
Showing
8 changed files
with
149 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
-module(mongoose_internal_databases). | ||
-export([init/0]). | ||
|
||
init() -> | ||
case mongoose_config:lookup_opt([internal_databases, mnesia]) of | ||
{ok, _} -> | ||
init_mnesia(), | ||
mongoose_node_num_mnesia:init(); | ||
{error, _} -> | ||
%% Ensure mnesia is stopped when applying the test presets from the big tests. | ||
%% So, we accidentually do not test with mnesia enabled, when starting the | ||
%% test cases from the clean test build. | ||
%% TODO Stopping here would break a lot of tests, stop here once tests are fixed. | ||
% mnesia:stop(), | ||
ok | ||
end. | ||
|
||
init_mnesia() -> | ||
%% Mnesia should not be running at this point, unless it is started by tests. | ||
%% Ensure Mnesia is stopped | ||
mnesia:stop(), | ||
case mnesia:system_info(extra_db_nodes) of | ||
[] -> | ||
mnesia:create_schema([node()]); | ||
_ -> | ||
ok | ||
end, | ||
application:start(mnesia, permanent), | ||
mnesia:wait_for_tables(mnesia:system_info(local_tables), infinity). |