Skip to content

Commit

Permalink
TocStats check for data file existence
Browse files Browse the repository at this point in the history
  • Loading branch information
danovaro committed Apr 30, 2024
1 parent a6dd9ec commit a59cff6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.11.117
5.11.118
22 changes: 11 additions & 11 deletions src/fdb5/toc/TocStats.cc
Original file line number Diff line number Diff line change
Expand Up @@ -258,19 +258,19 @@ void TocStatsReportVisitor::visitDatum(const Field& field, const std::string& fi
const eckit::PathName& indexPath = currentIndex_->location().uri().path();

if (dataPath != lastDataPath_) {

if (allDataFiles_.find(dataPath) == allDataFiles_.end()) {

if (dataPath.dirName().sameAs(directory_)) {
dbStats->ownedFilesSize_ += dataPath.size();
dbStats->ownedFilesCount_++;
} else {
dbStats->adoptedFilesSize_ += dataPath.size();
dbStats->adoptedFilesCount_++;
if (dataPath.exists()) {
if (allDataFiles_.find(dataPath) == allDataFiles_.end()) {

if (dataPath.dirName().sameAs(directory_)) {
dbStats->ownedFilesSize_ += dataPath.size();
dbStats->ownedFilesCount_++;
} else {
dbStats->adoptedFilesSize_ += dataPath.size();
dbStats->adoptedFilesCount_++;
}
allDataFiles_.insert(dataPath);
}
allDataFiles_.insert(dataPath);
}

lastDataPath_ = dataPath;
}

Expand Down

0 comments on commit a59cff6

Please sign in to comment.