1
0
Fork 0

remove useless warnings

This commit is contained in:
jsteemann 2018-04-04 17:16:15 +02:00
parent d2bf3b3878
commit c5660ac54e
2 changed files with 13 additions and 13 deletions

View File

@ -127,19 +127,19 @@ void CheckVersionFeature::checkVersion() {
methods::VersionResult res = methods::Version::check(vocbase); methods::VersionResult res = methods::Version::check(vocbase);
TRI_ASSERT(vocbase != nullptr); TRI_ASSERT(vocbase != nullptr);
if (ignoreDatafileErrors) {
if (res.status == methods::VersionResult::CANNOT_PARSE_VERSION_FILE || if (res.status == methods::VersionResult::CANNOT_PARSE_VERSION_FILE ||
res.status == methods::VersionResult::CANNOT_READ_VERSION_FILE) { res.status == methods::VersionResult::CANNOT_READ_VERSION_FILE) {
if (ignoreDatafileErrors) {
// try to install a fresh new, empty VERSION file instead // try to install a fresh new, empty VERSION file instead
if (methods::Version::write(vocbase, std::map<std::string, bool>(), true).ok()) { if (methods::Version::write(vocbase, std::map<std::string, bool>(), true).ok()) {
// give it another try // give it another try
res = methods::Version::check(vocbase); res = methods::Version::check(vocbase);
} }
}
} else { } else {
LOG_TOPIC(WARN, Logger::STARTUP) << "in order to automatically fix the VERSION file on startup, " LOG_TOPIC(WARN, Logger::STARTUP) << "in order to automatically fix the VERSION file on startup, "
<< "please start the server with option `--database.ignore-logfile-errors true`"; << "please start the server with option `--database.ignore-logfile-errors true`";
} }
}
LOG_TOPIC(DEBUG, Logger::STARTUP) << "version check return status " LOG_TOPIC(DEBUG, Logger::STARTUP) << "version check return status "
<< res.status; << res.status;

View File

@ -103,20 +103,20 @@ UpgradeResult Upgrade::startup(TRI_vocbase_t* vocbase, bool isUpgrade, bool igno
VersionResult vinfo = Version::check(vocbase); VersionResult vinfo = Version::check(vocbase);
if (ignoreFileErrors) {
if (vinfo.status == methods::VersionResult::CANNOT_PARSE_VERSION_FILE || if (vinfo.status == methods::VersionResult::CANNOT_PARSE_VERSION_FILE ||
vinfo.status == methods::VersionResult::CANNOT_READ_VERSION_FILE) { vinfo.status == methods::VersionResult::CANNOT_READ_VERSION_FILE) {
if (ignoreFileErrors) {
// try to install a fresh new, empty VERSION file instead // try to install a fresh new, empty VERSION file instead
if (methods::Version::write(vocbase, std::map<std::string, bool>(), true).ok()) { if (methods::Version::write(vocbase, std::map<std::string, bool>(), true).ok()) {
// give it another try // give it another try
LOG_TOPIC(WARN, Logger::STARTUP) << "overwriting unparsable VERSION file with default value because option `--database.ignore-logfile-errors` is set"; LOG_TOPIC(WARN, Logger::STARTUP) << "overwriting unparsable VERSION file with default value because option `--database.ignore-logfile-errors` is set";
vinfo = methods::Version::check(vocbase); vinfo = methods::Version::check(vocbase);
} }
}
} else { } else {
LOG_TOPIC(WARN, Logger::STARTUP) << "in order to automatically fix the VERSION file on startup, " LOG_TOPIC(WARN, Logger::STARTUP) << "in order to automatically fix the VERSION file on startup, "
<< "please start the server with option `--database.ignore-logfile-errors true`"; << "please start the server with option `--database.ignore-logfile-errors true`";
} }
}
switch (vinfo.status) { switch (vinfo.status) {
case VersionResult::INVALID: case VersionResult::INVALID: