diff --git a/sstables/filter.cc b/sstables/filter.cc index a773039675..37002d639d 100644 --- a/sstables/filter.cc +++ b/sstables/filter.cc @@ -32,7 +32,11 @@ future<> sstable::read_filter() { } } _filter = utils::filter::create_filter(filter.hashes, std::move(bs)); + }).then([this] { + return engine().file_size(this->filename(sstable::component_type::Filter)); }); + }).then([this] (auto size) { + _filter_file_size = size; }); } diff --git a/sstables/sstables.hh b/sstables/sstables.hh index ce368c9d29..1d6c4e64f4 100644 --- a/sstables/sstables.hh +++ b/sstables/sstables.hh @@ -233,6 +233,9 @@ public: uint64_t index_size() { return _index_file_size; } + uint64_t filter_size() { + return _filter_file_size; + } // Returns the total bytes of all components. future bytes_on_disk(); @@ -266,6 +269,7 @@ private: file _data_file; uint64_t _data_file_size; uint64_t _index_file_size; + uint64_t _filter_file_size = 0; uint64_t _bytes_on_disk = 0; sstring _ks;