Commit c2ee009d authored by Matthieu Dorier's avatar Matthieu Dorier

enabled null database

parent 72376ea7
......@@ -67,6 +67,7 @@ void hepnos_run_service(MPI_Comm comm, const char* config_file, const char* conn
auto db_path = config->getDatabasePath(rank, sdskv_provider_id, i);
auto db_name = config->getDatabaseName(rank, sdskv_provider_id, i);
sdskv_db_type_t db_type;
if(config->getDatabaseType() == "null") db_type = KVDB_NULL;
if(config->getDatabaseType() == "map") db_type = KVDB_MAP;
if(config->getDatabaseType() == "ldb") db_type = KVDB_LEVELDB;
if(config->getDatabaseType() == "bdb") db_type = KVDB_BERKELEYDB;
......
......@@ -167,10 +167,11 @@ static YAML::Node loadAndValidate(const std::string& filename) {
throw Exception("\"database.type\" field not found in configuration file.");
}
std::string db_type = config["database"]["type"].as<std::string>();
if(db_type != "map"
if(db_type != "null"
&& db_type != "map"
&& db_type != "ldb"
&& db_type != "bdb") {
throw Exception("\"database.type\" field should be \"map\", \"ldb\", or \"bdb\".");
throw Exception("\"database.type\" field should be \"null\", \"map\", \"ldb\", or \"bdb\".");
}
if(config["storage"]) {
if(!config["storage"]["path"]) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment