1
0
Fork 0

more explicit order for SystemDatabaseFeature (#6335)

This commit is contained in:
Jan 2018-09-01 22:54:03 +02:00 committed by Frank Celler
parent 21388b2e2a
commit cb19878fad
10 changed files with 14 additions and 15 deletions

View File

@ -105,7 +105,7 @@ void EngineEqualityCheckFeature::start() {
if (ServerState::instance()->isCoordinator()) {
LOG_TOPIC(TRACE, arangodb::Logger::ENGINES) << "running storage engine equality check";
if (!equalStorageEngines()) {
if (!::equalStorageEngines()) {
LOG_TOPIC(FATAL, arangodb::Logger::ENGINES) << "the usage of different storage engines in the cluster is unsupported and may cause issues";
FATAL_ERROR_EXIT();
}

View File

@ -128,6 +128,7 @@ MMFilesLogfileManager::MMFilesLogfileManager(
startsAfter("Database");
startsAfter("EngineSelector");
startsAfter("MMFilesEngine");
startsAfter("SystemDatabase");
onlyEnabledWith("MMFilesEngine");
}

View File

@ -48,6 +48,7 @@ MMFilesWalRecoveryFeature::MMFilesWalRecoveryFeature(
startsAfter("MMFilesLogfileManager");
startsAfter("MMFilesPersistentIndex");
startsAfter("ServerId");
startsAfter("SystemDatabase");
onlyEnabledWith("MMFilesEngine");
onlyEnabledWith("MMFilesLogfileManager");

View File

@ -56,6 +56,7 @@ CheckVersionFeature::CheckVersionFeature(
startsAfter("DatabasePath");
startsAfter("EngineSelector");
startsAfter("ServerId");
startsAfter("SystemDatabase");
}
void CheckVersionFeature::collectOptions(

View File

@ -316,8 +316,6 @@ void DatabaseFeature::validateOptions(std::shared_ptr<ProgramOptions> options) {
}
}
void DatabaseFeature::prepare() {}
void DatabaseFeature::start() {
// set singleton
DATABASE = this;

View File

@ -70,7 +70,6 @@ class DatabaseFeature : public application_features::ApplicationFeature {
void collectOptions(std::shared_ptr<options::ProgramOptions>) override final;
void validateOptions(std::shared_ptr<options::ProgramOptions>) override final;
void prepare() override final;
void start() override final;
void beginShutdown() override final;
void stop() override final;
@ -186,4 +185,4 @@ class DatabaseFeature : public application_features::ApplicationFeature {
}
#endif
#endif

View File

@ -41,8 +41,9 @@ ServerIdFeature::ServerIdFeature(
)
: ApplicationFeature(server, "ServerId") {
setOptional(false);
startsAfter("Database");
startsAfter("BasicsPhase");
startsAfter("Database");
startsAfter("SystemDatabase");
}
void ServerIdFeature::start() {

View File

@ -21,16 +21,13 @@
/// @author Vasiliy Nabatchikov
////////////////////////////////////////////////////////////////////////////////
#include "DatabaseFeature.h"
#include "SystemDatabaseFeature.h"
#include "Logger/LogMacros.h"
#include "RestServer/DatabaseFeature.h"
#include "VocBase/vocbase.h"
#include "SystemDatabaseFeature.h"
namespace {
static std::string const FEATURE_NAME("SystemDatabase");
}
namespace arangodb {
@ -69,7 +66,7 @@ void SystemDatabaseFeature::start() {
FATAL_ERROR_EXIT();
}
void SystemDatabaseFeature::stop() {
void SystemDatabaseFeature::unprepare() {
_vocbase.store(nullptr);
}
@ -83,4 +80,4 @@ SystemDatabaseFeature::ptr SystemDatabaseFeature::use() const {
// -----------------------------------------------------------------------------
// --SECTION-- END-OF-FILE
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------

View File

@ -49,7 +49,7 @@ class SystemDatabaseFeature final:
static std::string const& name() noexcept;
void start() override;
void stop() override;
void unprepare() override;
ptr use() const;
private:
@ -58,4 +58,4 @@ class SystemDatabaseFeature final:
} // arangodb
#endif
#endif

View File

@ -79,6 +79,7 @@ RocksDBRecoveryManager::RocksDBRecoveryManager(
startsAfter("BasicsPhase");
startsAfter("Database");
startsAfter("SystemDatabase");
startsAfter("RocksDBEngine");
startsAfter("ServerId");
startsAfter("StorageEngine");