mirror of https://gitee.com/bigwinds/arangodb
suppress warnings on startup
This commit is contained in:
parent
09e1fda1a0
commit
80dd86cb4d
|
@ -1089,8 +1089,7 @@ int MMFilesCollection::iterateMarkersOnLoad(arangodb::Transaction* trx) {
|
||||||
_lastRevision >= static_cast<TRI_voc_rid_t>(2016 - 1970) * 1000 * 60 * 60 * 24 * 365 &&
|
_lastRevision >= static_cast<TRI_voc_rid_t>(2016 - 1970) * 1000 * 60 * 60 * 24 * 365 &&
|
||||||
application_features::ApplicationServer::server->getFeature<DatabaseFeature>("Database")->check30Revisions()) {
|
application_features::ApplicationServer::server->getFeature<DatabaseFeature>("Database")->check30Revisions()) {
|
||||||
// a collection from 3.0 or earlier with a _rev value that is higher than we can handle safely
|
// a collection from 3.0 or earlier with a _rev value that is higher than we can handle safely
|
||||||
LOG(FATAL) << "collection '" << _logicalCollection->name() << "' contains _rev values that are higher than expected for an ArangoDB 3.0 database. If this collection was created or used with a pre-release ArangoDB 3.1, please restart the server with option '--database.check-30-revisions false' to suppress this warning.";
|
LOG(WARN) << "collection '" << _logicalCollection->name() << "' contains _rev values that are higher than expected for an ArangoDB 3.0 database. If this collection was created or used with a pre-release or development version of ArangoDB 3.1, please restart the server with option '--database.check-30-revisions false' to suppress this warning.";
|
||||||
FATAL_ERROR_EXIT();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -120,7 +120,6 @@ std::string const MMFilesEngine::EngineName("MMFiles");
|
||||||
// create the storage engine
|
// create the storage engine
|
||||||
MMFilesEngine::MMFilesEngine(application_features::ApplicationServer* server)
|
MMFilesEngine::MMFilesEngine(application_features::ApplicationServer* server)
|
||||||
: StorageEngine(server, EngineName),
|
: StorageEngine(server, EngineName),
|
||||||
_iterateMarkersOnOpen(true),
|
|
||||||
_isUpgrade(false),
|
_isUpgrade(false),
|
||||||
_maxTick(0) {
|
_maxTick(0) {
|
||||||
}
|
}
|
||||||
|
@ -157,27 +156,18 @@ void MMFilesEngine::start() {
|
||||||
// test if the "databases" directory is present and writable
|
// test if the "databases" directory is present and writable
|
||||||
verifyDirectories();
|
verifyDirectories();
|
||||||
|
|
||||||
int res = TRI_ERROR_NO_ERROR;
|
|
||||||
|
|
||||||
// get names of all databases
|
// get names of all databases
|
||||||
std::vector<std::string> names(getDatabaseNames());
|
std::vector<std::string> names(getDatabaseNames());
|
||||||
|
|
||||||
if (names.empty()) {
|
if (names.empty()) {
|
||||||
// no databases found, i.e. there is no system database!
|
// no databases found, i.e. there is no system database!
|
||||||
// create a database for the system database
|
// create a database for the system database
|
||||||
res = createDatabaseDirectory(TRI_NewTickServer(), TRI_VOC_SYSTEM_DATABASE);
|
int res = createDatabaseDirectory(TRI_NewTickServer(), TRI_VOC_SYSTEM_DATABASE);
|
||||||
_iterateMarkersOnOpen = false;
|
|
||||||
} else {
|
|
||||||
_iterateMarkersOnOpen = !application_features::ApplicationServer::getFeature<wal::LogfileManager>("LogfileManager")->hasFoundLastTick();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (res != TRI_ERROR_NO_ERROR) {
|
if (res != TRI_ERROR_NO_ERROR) {
|
||||||
LOG(ERR) << "unable to initialize databases: " << TRI_errno_string(res);
|
LOG(ERR) << "unable to initialize databases: " << TRI_errno_string(res);
|
||||||
THROW_ARANGO_EXCEPTION(res);
|
THROW_ARANGO_EXCEPTION(res);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_iterateMarkersOnOpen) {
|
|
||||||
LOG(WARN) << "no shutdown info found. scanning datafiles for last tick...";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -413,10 +403,6 @@ int MMFilesEngine::getCollectionsAndIndexes(TRI_vocbase_t* vocbase,
|
||||||
arangodb::velocypack::Builder& result,
|
arangodb::velocypack::Builder& result,
|
||||||
bool wasCleanShutdown,
|
bool wasCleanShutdown,
|
||||||
bool isUpgrade) {
|
bool isUpgrade) {
|
||||||
if (!wasCleanShutdown) {
|
|
||||||
LOG(TRACE) << "scanning all collection markers in database '" << vocbase->name() << "'";
|
|
||||||
}
|
|
||||||
|
|
||||||
result.openArray();
|
result.openArray();
|
||||||
|
|
||||||
std::string const path = databaseDirectory(vocbase->id());
|
std::string const path = databaseDirectory(vocbase->id());
|
||||||
|
@ -1218,6 +1204,7 @@ TRI_vocbase_t* MMFilesEngine::openExistingDatabase(TRI_voc_tick_t id, std::strin
|
||||||
if (!wasCleanShutdown) {
|
if (!wasCleanShutdown) {
|
||||||
// iterating markers may be time-consuming. we'll only do it if
|
// iterating markers may be time-consuming. we'll only do it if
|
||||||
// we have to
|
// we have to
|
||||||
|
LOG(WARN) << "no shutdown info found. scanning all collection markers in collection '" << collection->name() << "', database '" << vocbase->name() << "'";
|
||||||
findMaxTickInJournals(collection->path());
|
findMaxTickInJournals(collection->path());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -339,7 +339,6 @@ class MMFilesEngine final : public StorageEngine {
|
||||||
private:
|
private:
|
||||||
std::string _basePath;
|
std::string _basePath;
|
||||||
std::string _databasePath;
|
std::string _databasePath;
|
||||||
bool _iterateMarkersOnOpen;
|
|
||||||
bool _isUpgrade;
|
bool _isUpgrade;
|
||||||
TRI_voc_tick_t _maxTick;
|
TRI_voc_tick_t _maxTick;
|
||||||
std::vector<std::pair<std::string, std::string>> _deleted;
|
std::vector<std::pair<std::string, std::string>> _deleted;
|
||||||
|
|
Loading…
Reference in New Issue