mirror of https://gitee.com/bigwinds/arangodb
fix assertions
This commit is contained in:
parent
aed8e7b40d
commit
ee858a1906
|
@ -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);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue