mirror of https://gitee.com/bigwinds/arangodb
added static variables for debugging
This commit is contained in:
parent
1160961af8
commit
2b3e18418a
|
@ -69,6 +69,11 @@ using namespace arangodb::application_features;
|
||||||
using namespace arangodb::basics;
|
using namespace arangodb::basics;
|
||||||
using namespace arangodb::options;
|
using namespace arangodb::options;
|
||||||
|
|
||||||
|
#ifdef ARANGODB_ENABLE_MAINTAINER_MODE
|
||||||
|
// i am here for debugging only.
|
||||||
|
TRI_vocbase_t* DatabaseFeature::CURRENT_VOCBASE = nullptr;
|
||||||
|
#endif
|
||||||
|
|
||||||
DatabaseFeature* DatabaseFeature::DATABASE = nullptr;
|
DatabaseFeature* DatabaseFeature::DATABASE = nullptr;
|
||||||
|
|
||||||
/// @brief database manager thread main loop
|
/// @brief database manager thread main loop
|
||||||
|
@ -395,6 +400,11 @@ void DatabaseFeature::beginShutdown() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void DatabaseFeature::stop() {
|
void DatabaseFeature::stop() {
|
||||||
|
#ifdef ARANGODB_ENABLE_MAINTAINER_MODE
|
||||||
|
// i am here for debugging only.
|
||||||
|
static TRI_vocbase_t* currentVocbase = nullptr;
|
||||||
|
#endif
|
||||||
|
|
||||||
stopAppliers();
|
stopAppliers();
|
||||||
|
|
||||||
// turn off query cache and flush it
|
// turn off query cache and flush it
|
||||||
|
@ -424,11 +434,17 @@ void DatabaseFeature::stop() {
|
||||||
|
|
||||||
#ifdef ARANGODB_ENABLE_MAINTAINER_MODE
|
#ifdef ARANGODB_ENABLE_MAINTAINER_MODE
|
||||||
// i am here for debugging only.
|
// i am here for debugging only.
|
||||||
|
currentVocbase = vocbase;
|
||||||
|
CURRENT_VOCBASE = vocbase;
|
||||||
|
static size_t currentCursorCount = currentVocbase->cursorRepository()->count();
|
||||||
|
static size_t currentKeysCount = currentVocbase->collectionKeys()->count();
|
||||||
|
static size_t currentQueriesCount = currentVocbase->queryList()->count();
|
||||||
|
|
||||||
LOG_TOPIC("840a4", DEBUG, Logger::FIXME)
|
LOG_TOPIC("840a4", DEBUG, Logger::FIXME)
|
||||||
<< "shutting down database " << vocbase->name() << ": " << (void*) vocbase
|
<< "shutting down database " << currentVocbase->name() << ": " << (void*) currentVocbase
|
||||||
<< ", cursors: " << vocbase->cursorRepository()->count()
|
<< ", cursors: " << currentCursorCount
|
||||||
<< ", keys: " << vocbase->collectionKeys()->count()
|
<< ", keys: " << currentKeysCount
|
||||||
<< ", queries: " << vocbase->queryList()->count();
|
<< ", queries: " << currentQueriesCount;
|
||||||
#endif
|
#endif
|
||||||
vocbase->processCollections(
|
vocbase->processCollections(
|
||||||
[](LogicalCollection* collection) {
|
[](LogicalCollection* collection) {
|
||||||
|
@ -442,7 +458,7 @@ void DatabaseFeature::stop() {
|
||||||
#ifdef ARANGODB_ENABLE_MAINTAINER_MODE
|
#ifdef ARANGODB_ENABLE_MAINTAINER_MODE
|
||||||
// i am here for debugging only.
|
// i am here for debugging only.
|
||||||
LOG_TOPIC("4b2b7", DEBUG, Logger::FIXME)
|
LOG_TOPIC("4b2b7", DEBUG, Logger::FIXME)
|
||||||
<< "shutting down database " << vocbase->name() << ": " << (void*) vocbase << " successful";
|
<< "shutting down database " << currentVocbase->name() << ": " << (void*) currentVocbase << " successful";
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -195,6 +195,11 @@ class DatabaseFeature : public application_features::ApplicationFeature {
|
||||||
/// maintains a global counter that is increased on every modification
|
/// maintains a global counter that is increased on every modification
|
||||||
/// (addition, removal, change) of database objects
|
/// (addition, removal, change) of database objects
|
||||||
VersionTracker _versionTracker;
|
VersionTracker _versionTracker;
|
||||||
|
|
||||||
|
#ifdef ARANGODB_ENABLE_MAINTAINER_MODE
|
||||||
|
// i am here for debugging only.
|
||||||
|
static TRI_vocbase_t* CURRENT_VOCBASE;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace arangodb
|
} // namespace arangodb
|
||||||
|
|
Loading…
Reference in New Issue