1
0
Fork 0

fix assertions

This commit is contained in:
jsteemann 2018-06-28 21:57:44 +02:00
parent aed8e7b40d
commit ee858a1906
2 changed files with 7 additions and 4 deletions

View File

@ -464,8 +464,7 @@ std::unique_ptr<TRI_vocbase_t> ClusterEngine::openExistingDatabase(
bool wasCleanShutdown,
bool isUpgrade
) {
// TODO make this a coordinator type vocbase
return std::make_unique<TRI_vocbase_t>(TRI_VOCBASE_TYPE_NORMAL, id, name);
return std::make_unique<TRI_vocbase_t>(TRI_VOCBASE_TYPE_COORDINATOR, id, name);
}
// -----------------------------------------------------------------------------

View File

@ -391,7 +391,9 @@ void DatabaseFeature::stop() {
TRI_vocbase_t* vocbase = p.second;
// iterate over all databases
TRI_ASSERT(vocbase != nullptr);
TRI_ASSERT(vocbase->type() == TRI_VOCBASE_TYPE_NORMAL);
if (vocbase->type() != TRI_VOCBASE_TYPE_NORMAL) {
continue;
}
vocbase->processCollections([](LogicalCollection* collection) {
// no one else must modify the collection's status while we are in here
@ -462,7 +464,9 @@ void DatabaseFeature::recoveryDone() {
TRI_vocbase_t* vocbase = p.second;
// iterate over all databases
TRI_ASSERT(vocbase != nullptr);
TRI_ASSERT(vocbase->type() == TRI_VOCBASE_TYPE_NORMAL);
if (vocbase->type() != TRI_VOCBASE_TYPE_NORMAL) {
continue;
}
// execute the engine-specific callbacks on successful recovery
engine->recoveryDone(*vocbase);