Commit a49396c0 authored by Georgios Bitzes's avatar Georgios Bitzes
Browse files

Suppress MANIFEST warning if no manifest or SST files were found

parent fd57f456
Pipeline #1492444 failed with stages
in 86 minutes and 47 seconds
# Changelog
## Unreleased
### Bug fixes
- The mechanism meant to provide an early warning for potential ``MANIFEST``
corruption was flaky, and would sometimes report a problem where none existed.
Many thanks to Franck Eyraud (JRC) for the bug report concerning erroneous ``MANIFEST``-related
warning.
## 0.4.2 (2020-03-12)
### Bug fixes
......
......@@ -63,7 +63,10 @@ Status ParanoidManifestChecker::checkDB(std::string_view path) {
struct dirent* entry = nullptr;
struct timespec manifestMtime;
manifestMtime.tv_sec = 0;
struct timespec sstMtime;
sstMtime.tv_sec = 0;
while((entry = iter.next())) {
struct stat statbuf;
......@@ -83,7 +86,7 @@ Status ParanoidManifestChecker::checkDB(std::string_view path) {
std::string diff = SSTR(secDiff << " sec, " << timespecToString(sstMtime) << " vs " << timespecToString(manifestMtime));
// 1 hour should be more than enough (?)
if(secDiff >= 3600) {
if(manifestMtime.tv_sec != 0 && sstMtime.tv_sec != 0 && secDiff >= 3600) {
return Status(1, diff);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment