1
0
Fork 0
This commit is contained in:
jsteemann 2016-07-25 16:16:07 +02:00
parent 6a480c0214
commit 50f3dcfb3f
2 changed files with 5 additions and 10 deletions

View File

@ -184,7 +184,7 @@ void DatabaseManagerThread::run() {
usleep(waitTime()); usleep(waitTime());
// The following is only necessary after a wait: // The following is only necessary after a wait:
auto queryRegistry = databaseFeature->_queryRegistry.load(); auto queryRegistry = QueryRegistryFeature::QUERY_REGISTRY;
if (queryRegistry != nullptr) { if (queryRegistry != nullptr) {
queryRegistry->expireQueries(); queryRegistry->expireQueries();
@ -226,8 +226,6 @@ DatabaseFeature::DatabaseFeature(ApplicationServer* server)
_ignoreDatafileErrors(false), _ignoreDatafileErrors(false),
_throwCollectionNotLoadedError(false), _throwCollectionNotLoadedError(false),
_vocbase(nullptr), _vocbase(nullptr),
_queryRegistry(nullptr),
_databaseManager(nullptr),
_databasesLists(new DatabasesLists()), _databasesLists(new DatabasesLists()),
_isInitiallyEmpty(false), _isInitiallyEmpty(false),
_replicationApplier(true), _replicationApplier(true),
@ -337,16 +335,14 @@ void DatabaseFeature::start() {
FATAL_ERROR_EXIT(); FATAL_ERROR_EXIT();
} }
// TODO:
/*
// start database manager thread // start database manager thread
_databaseManager = new DatabaseManagerThread; _databaseManager.reset(new DatabaseManagerThread);
if (!_databaseManager->start()) { if (!_databaseManager->start()) {
LOG(FATAL) << "could not start database manager thread"; LOG(FATAL) << "could not start database manager thread";
FATAL_ERROR_EXIT(); FATAL_ERROR_EXIT();
} }
*/
// TODO: handle _upgrade and _checkVersion here // TODO: handle _upgrade and _checkVersion here
// update all v8 contexts // update all v8 contexts
@ -377,7 +373,7 @@ void DatabaseFeature::unprepare() {
// we're in the shutdown... simply ignore any errors produced here // we're in the shutdown... simply ignore any errors produced here
} }
delete _databaseManager; _databaseManager.reset();
try { try {
// closeOpenDatabases() can throw, but we're in a dtor // closeOpenDatabases() can throw, but we're in a dtor

View File

@ -153,8 +153,7 @@ class DatabaseFeature final : public application_features::ApplicationFeature {
bool _throwCollectionNotLoadedError; bool _throwCollectionNotLoadedError;
TRI_vocbase_t* _vocbase; TRI_vocbase_t* _vocbase;
std::atomic<arangodb::aql::QueryRegistry*> _queryRegistry; // TODO std::unique_ptr<DatabaseManagerThread> _databaseManager;
DatabaseManagerThread* _databaseManager;
std::atomic<DatabasesLists*> _databasesLists; std::atomic<DatabasesLists*> _databasesLists;
// TODO: Make this again a template once everybody has gcc >= 4.9.2 // TODO: Make this again a template once everybody has gcc >= 4.9.2