mirror of https://gitee.com/bigwinds/arangodb
remove useless warnings
This commit is contained in:
parent
d2bf3b3878
commit
c5660ac54e
|
@ -127,18 +127,18 @@ void CheckVersionFeature::checkVersion() {
|
|||
methods::VersionResult res = methods::Version::check(vocbase);
|
||||
TRI_ASSERT(vocbase != nullptr);
|
||||
|
||||
if (ignoreDatafileErrors) {
|
||||
if (res.status == methods::VersionResult::CANNOT_PARSE_VERSION_FILE ||
|
||||
res.status == methods::VersionResult::CANNOT_READ_VERSION_FILE) {
|
||||
if (res.status == methods::VersionResult::CANNOT_PARSE_VERSION_FILE ||
|
||||
res.status == methods::VersionResult::CANNOT_READ_VERSION_FILE) {
|
||||
if (ignoreDatafileErrors) {
|
||||
// try to install a fresh new, empty VERSION file instead
|
||||
if (methods::Version::write(vocbase, std::map<std::string, bool>(), true).ok()) {
|
||||
// give it another try
|
||||
res = methods::Version::check(vocbase);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
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`";
|
||||
} else {
|
||||
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`";
|
||||
}
|
||||
}
|
||||
|
||||
LOG_TOPIC(DEBUG, Logger::STARTUP) << "version check return status "
|
||||
|
|
|
@ -103,19 +103,19 @@ UpgradeResult Upgrade::startup(TRI_vocbase_t* vocbase, bool isUpgrade, bool igno
|
|||
|
||||
VersionResult vinfo = Version::check(vocbase);
|
||||
|
||||
if (ignoreFileErrors) {
|
||||
if (vinfo.status == methods::VersionResult::CANNOT_PARSE_VERSION_FILE ||
|
||||
vinfo.status == methods::VersionResult::CANNOT_READ_VERSION_FILE) {
|
||||
if (vinfo.status == methods::VersionResult::CANNOT_PARSE_VERSION_FILE ||
|
||||
vinfo.status == methods::VersionResult::CANNOT_READ_VERSION_FILE) {
|
||||
if (ignoreFileErrors) {
|
||||
// try to install a fresh new, empty VERSION file instead
|
||||
if (methods::Version::write(vocbase, std::map<std::string, bool>(), true).ok()) {
|
||||
// give it another try
|
||||
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);
|
||||
}
|
||||
} else {
|
||||
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`";
|
||||
}
|
||||
} else {
|
||||
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`";
|
||||
}
|
||||
|
||||
switch (vinfo.status) {
|
||||
|
|
Loading…
Reference in New Issue