1
0
Fork 0

fix blind spot in storage engine selection (#4810)

This commit is contained in:
Jan 2018-03-12 13:41:00 +01:00 committed by GitHub
parent 70bc1beae6
commit f781fe5cbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 5 deletions

View File

@ -54,5 +54,6 @@ void ReplicationTimeoutFeature::collectOptions(std::shared_ptr<ProgramOptions> o
void ReplicationTimeoutFeature::prepare() {
// set minimum timeout. this depends on the selected storage engine
TRI_ASSERT(EngineSelectorFeature::ENGINE != nullptr);
lowerLimit = EngineSelectorFeature::ENGINE->minimumSyncReplicationTimeout();
}

View File

@ -74,10 +74,10 @@ void EngineSelectorFeature::prepare() {
LOG_TOPIC(FATAL, Logger::STARTUP) << "unable to read content of 'ENGINE' file '" << _engineFilePath << "': " << ex.what() << ". please make sure the file/directory is readable for the arangod process and user";
FATAL_ERROR_EXIT();
}
} else {
if (_engine == "auto") {
_engine = MMFilesEngine::EngineName;
}
}
if (_engine == "auto") {
_engine = MMFilesEngine::EngineName;
}
TRI_ASSERT(_engine != "auto");
@ -101,10 +101,15 @@ void EngineSelectorFeature::prepare() {
}
}
TRI_ASSERT(ENGINE != nullptr);
if (ENGINE == nullptr) {
LOG_TOPIC(FATAL, Logger::STARTUP) << "unable to figure out storage engine from selection '" << _engine << "'. please use the '--server.storage-engine' option to select an existing storage engine";
FATAL_ERROR_EXIT();
}
}
void EngineSelectorFeature::start() {
TRI_ASSERT(ENGINE != nullptr);
// write engine File
if (!basics::FileUtils::isRegularFile(_engineFilePath)) {
try {