mirror of https://gitee.com/bigwinds/arangodb
more explicit order for SystemDatabaseFeature (#6335)
This commit is contained in:
parent
21388b2e2a
commit
cb19878fad
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -128,6 +128,7 @@ MMFilesLogfileManager::MMFilesLogfileManager(
|
|||
startsAfter("Database");
|
||||
startsAfter("EngineSelector");
|
||||
startsAfter("MMFilesEngine");
|
||||
startsAfter("SystemDatabase");
|
||||
|
||||
onlyEnabledWith("MMFilesEngine");
|
||||
}
|
||||
|
|
|
@ -48,6 +48,7 @@ MMFilesWalRecoveryFeature::MMFilesWalRecoveryFeature(
|
|||
startsAfter("MMFilesLogfileManager");
|
||||
startsAfter("MMFilesPersistentIndex");
|
||||
startsAfter("ServerId");
|
||||
startsAfter("SystemDatabase");
|
||||
|
||||
onlyEnabledWith("MMFilesEngine");
|
||||
onlyEnabledWith("MMFilesLogfileManager");
|
||||
|
|
|
@ -56,6 +56,7 @@ CheckVersionFeature::CheckVersionFeature(
|
|||
startsAfter("DatabasePath");
|
||||
startsAfter("EngineSelector");
|
||||
startsAfter("ServerId");
|
||||
startsAfter("SystemDatabase");
|
||||
}
|
||||
|
||||
void CheckVersionFeature::collectOptions(
|
||||
|
|
|
@ -316,8 +316,6 @@ void DatabaseFeature::validateOptions(std::shared_ptr<ProgramOptions> options) {
|
|||
}
|
||||
}
|
||||
|
||||
void DatabaseFeature::prepare() {}
|
||||
|
||||
void DatabaseFeature::start() {
|
||||
// set singleton
|
||||
DATABASE = this;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -41,8 +41,9 @@ ServerIdFeature::ServerIdFeature(
|
|||
)
|
||||
: ApplicationFeature(server, "ServerId") {
|
||||
setOptional(false);
|
||||
startsAfter("Database");
|
||||
startsAfter("BasicsPhase");
|
||||
startsAfter("Database");
|
||||
startsAfter("SystemDatabase");
|
||||
}
|
||||
|
||||
void ServerIdFeature::start() {
|
||||
|
|
|
@ -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
|
||||
// -----------------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------------
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -79,6 +79,7 @@ RocksDBRecoveryManager::RocksDBRecoveryManager(
|
|||
startsAfter("BasicsPhase");
|
||||
|
||||
startsAfter("Database");
|
||||
startsAfter("SystemDatabase");
|
||||
startsAfter("RocksDBEngine");
|
||||
startsAfter("ServerId");
|
||||
startsAfter("StorageEngine");
|
||||
|
|
Loading…
Reference in New Issue