Skip to content

Commit

Permalink
debug wrong missing indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
canepat committed Dec 5, 2024
1 parent 67d00bd commit 916ca3c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions silkworm/db/datastore/snapshots/snapshot_repository.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,14 @@ std::vector<std::shared_ptr<IndexBuilder>> SnapshotRepository::missing_indexes()
SnapshotBundlePaths some_bundle_paths{schema_, path(), {Step{0}, Step{1}}};
auto segment_file_ext = some_bundle_paths.segment_paths().begin()->second.extension();
SnapshotPathList segment_files = get_files(segment_file_ext);
SILK_INFO << "num segment files: " << segment_files.size();
auto index_builders = index_builders_factory_->index_builders(segment_files);
SILK_INFO << "num index builders: " << index_builders.size();

std::erase_if(index_builders, [&](const auto& builder) {
return builder->path().exists();
});
SILK_INFO << "num missing index builders: " << index_builders.size();
return index_builders;
}

Expand Down

0 comments on commit 916ca3c

Please sign in to comment.