mirror of https://gitee.com/bigwinds/arangodb
fix recovery tests
This commit is contained in:
parent
4cef5d86fb
commit
8e0a59285b
|
@ -1098,8 +1098,10 @@ std::shared_ptr<Index> LogicalCollection::createIndex(Transaction* trx,
|
|||
if (res != TRI_ERROR_NO_ERROR) {
|
||||
THROW_ARANGO_EXCEPTION(res);
|
||||
}
|
||||
|
||||
res = saveIndex(idx.get(), true);
|
||||
|
||||
|
||||
bool const writeMarker = !arangodb::wal::LogfileManager::instance()->isInRecovery();
|
||||
res = saveIndex(idx.get(), writeMarker);
|
||||
|
||||
if (res != TRI_ERROR_NO_ERROR) {
|
||||
THROW_ARANGO_EXCEPTION(res);
|
||||
|
|
|
@ -850,7 +850,7 @@ TRI_collection_t* TRI_collection_t::open(TRI_vocbase_t* vocbase,
|
|||
res = col->createInitialIndexes();
|
||||
|
||||
if (res != TRI_ERROR_NO_ERROR) {
|
||||
LOG(ERR) << "cannot initialize document collection";
|
||||
LOG(ERR) << "cannot initialize document collection: " << TRI_errno_string(res);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -898,9 +898,13 @@ TRI_collection_t* TRI_collection_t::open(TRI_vocbase_t* vocbase,
|
|||
try {
|
||||
col->detectIndexes(&trx);
|
||||
col->useSecondaryIndexes(old);
|
||||
} catch (std::exception const& ex) {
|
||||
col->useSecondaryIndexes(old);
|
||||
LOG(ERR) << "cannot initialize collection indexes: " << ex.what();
|
||||
return nullptr;
|
||||
} catch (...) {
|
||||
col->useSecondaryIndexes(old);
|
||||
LOG(ERR) << "cannot initialize collection indexes";
|
||||
LOG(ERR) << "cannot initialize collection indexes: unknown exception";
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue