1
0
Fork 0

suppress warnings on startup

This commit is contained in:
jsteemann 2016-10-24 17:24:36 +02:00
parent 09e1fda1a0
commit 80dd86cb4d
3 changed files with 8 additions and 23 deletions

View File

@ -1089,8 +1089,7 @@ int MMFilesCollection::iterateMarkersOnLoad(arangodb::Transaction* trx) {
_lastRevision >= static_cast<TRI_voc_rid_t>(2016 - 1970) * 1000 * 60 * 60 * 24 * 365 &&
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
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.";
FATAL_ERROR_EXIT();
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.";
}

View File

@ -120,7 +120,6 @@ std::string const MMFilesEngine::EngineName("MMFiles");
// create the storage engine
MMFilesEngine::MMFilesEngine(application_features::ApplicationServer* server)
: StorageEngine(server, EngineName),
_iterateMarkersOnOpen(true),
_isUpgrade(false),
_maxTick(0) {
}
@ -157,28 +156,19 @@ void MMFilesEngine::start() {
// test if the "databases" directory is present and writable
verifyDirectories();
int res = TRI_ERROR_NO_ERROR;
// get names of all databases
std::vector<std::string> names(getDatabaseNames());
if (names.empty()) {
// no databases found, i.e. there is no system database!
// create a database for the system database
res = createDatabaseDirectory(TRI_NewTickServer(), TRI_VOC_SYSTEM_DATABASE);
_iterateMarkersOnOpen = false;
} else {
_iterateMarkersOnOpen = !application_features::ApplicationServer::getFeature<wal::LogfileManager>("LogfileManager")->hasFoundLastTick();
}
int res = createDatabaseDirectory(TRI_NewTickServer(), TRI_VOC_SYSTEM_DATABASE);
if (res != TRI_ERROR_NO_ERROR) {
LOG(ERR) << "unable to initialize databases: " << TRI_errno_string(res);
THROW_ARANGO_EXCEPTION(res);
}
if (_iterateMarkersOnOpen) {
LOG(WARN) << "no shutdown info found. scanning datafiles for last tick...";
}
if (res != TRI_ERROR_NO_ERROR) {
LOG(ERR) << "unable to initialize databases: " << TRI_errno_string(res);
THROW_ARANGO_EXCEPTION(res);
}
}
}
// stop the storage engine. this can be used to flush all data to disk,
@ -413,10 +403,6 @@ int MMFilesEngine::getCollectionsAndIndexes(TRI_vocbase_t* vocbase,
arangodb::velocypack::Builder& result,
bool wasCleanShutdown,
bool isUpgrade) {
if (!wasCleanShutdown) {
LOG(TRACE) << "scanning all collection markers in database '" << vocbase->name() << "'";
}
result.openArray();
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) {
// iterating markers may be time-consuming. we'll only do it if
// we have to
LOG(WARN) << "no shutdown info found. scanning all collection markers in collection '" << collection->name() << "', database '" << vocbase->name() << "'";
findMaxTickInJournals(collection->path());
}

View File

@ -339,7 +339,6 @@ class MMFilesEngine final : public StorageEngine {
private:
std::string _basePath;
std::string _databasePath;
bool _iterateMarkersOnOpen;
bool _isUpgrade;
TRI_voc_tick_t _maxTick;
std::vector<std::pair<std::string, std::string>> _deleted;