mirror of https://gitee.com/bigwinds/arangodb
fix shutdown order
This commit is contained in:
parent
68611a0a6a
commit
68b4b2f393
|
@ -58,6 +58,7 @@ ClusterFeature::ClusterFeature(application_features::ApplicationServer* server)
|
||||||
setOptional(true);
|
setOptional(true);
|
||||||
requiresElevatedPrivileges(false);
|
requiresElevatedPrivileges(false);
|
||||||
startsAfter("Authentication");
|
startsAfter("Authentication");
|
||||||
|
startsAfter("CacheManager");
|
||||||
startsAfter("Logger");
|
startsAfter("Logger");
|
||||||
startsAfter("WorkMonitor");
|
startsAfter("WorkMonitor");
|
||||||
startsAfter("Database");
|
startsAfter("Database");
|
||||||
|
@ -571,6 +572,8 @@ void ClusterFeature::unprepare() {
|
||||||
|
|
||||||
AgencyCommManager::MANAGER->stop();
|
AgencyCommManager::MANAGER->stop();
|
||||||
ClusterComm::cleanup();
|
ClusterComm::cleanup();
|
||||||
|
|
||||||
|
ClusterInfo::cleanup();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ClusterFeature::setUnregisterOnShutdown(bool unregisterOnShutdown) {
|
void ClusterFeature::setUnregisterOnShutdown(bool unregisterOnShutdown) {
|
||||||
|
|
|
@ -213,6 +213,23 @@ ClusterInfo::ClusterInfo(AgencyCallbackRegistry* agencyCallbackRegistry)
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
ClusterInfo::~ClusterInfo() {}
|
ClusterInfo::~ClusterInfo() {}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/// @brief cleanup method which frees cluster-internal shared ptrs on shutdown
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void ClusterInfo::cleanup() {
|
||||||
|
ClusterInfo* theInstance = instance();
|
||||||
|
if (theInstance == nullptr) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
theInstance->_plannedCollections.clear();
|
||||||
|
theInstance->_shards.clear();
|
||||||
|
theInstance->_shardKeys.clear();
|
||||||
|
theInstance->_shardIds.clear();
|
||||||
|
theInstance->_currentCollections.clear();
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief increase the uniqid value. if it exceeds the upper bound, fetch a
|
/// @brief increase the uniqid value. if it exceeds the upper bound, fetch a
|
||||||
|
|
|
@ -251,6 +251,12 @@ class ClusterInfo {
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
static ClusterInfo* instance();
|
static ClusterInfo* instance();
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
/// @brief cleanup method which frees cluster-internal shared ptrs on shutdown
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
static void cleanup();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Reference in New Issue