diff --git a/db/compaction/compaction.cc b/db/compaction/compaction.cc index eb4145fe13f..4bdafbdc43d 100644 --- a/db/compaction/compaction.cc +++ b/db/compaction/compaction.cc @@ -543,7 +543,7 @@ std::unique_ptr Compaction::CreateCompactionFilter( for (auto l = inputs_.begin(); l != inputs_.end(); ++l) { for (auto f = l->files.begin(); f != l->files.end(); ++f) { std::shared_ptr tp; - Status s = input_version_->GetTableProperties(&tp, *f); + Status s = input_version_->GetTableProperties(&tp, *f, nullptr, false /*no_io*/); assert(s.ok()); context.file_numbers.push_back((*f)->fd.GetNumber()); context.table_properties.push_back(tp); diff --git a/db/version_set.cc b/db/version_set.cc index 7127dac9490..14177fe83f4 100644 --- a/db/version_set.cc +++ b/db/version_set.cc @@ -1191,12 +1191,13 @@ class BaseReferencedVersionBuilder { Status Version::GetTableProperties(std::shared_ptr* tp, const FileMetaData* file_meta, - const std::string* fname) const { + const std::string* fname, + bool no_io) const { auto table_cache = cfd_->table_cache(); auto ioptions = cfd_->ioptions(); Status s = table_cache->GetTableProperties( env_options_, cfd_->internal_comparator(), file_meta->fd, tp, - mutable_cf_options_.prefix_extractor.get(), true /* no io */); + mutable_cf_options_.prefix_extractor.get(), no_io); if (s.ok()) { return s; } diff --git a/db/version_set.h b/db/version_set.h index 10c40aa004a..b2684254854 100644 --- a/db/version_set.h +++ b/db/version_set.h @@ -615,7 +615,8 @@ class Version { // file-name conversion. Status GetTableProperties(std::shared_ptr* tp, const FileMetaData* file_meta, - const std::string* fname = nullptr) const; + const std::string* fname = nullptr, + bool no_io = true) const; // REQUIRES: lock is held // On success, *props will be populated with all SSTables' table properties.