diff --git a/table/block_based/block_based_table_reader.cc b/table/block_based/block_based_table_reader.cc index df8dfcb45386..acb86bd44e6a 100644 --- a/table/block_based/block_based_table_reader.cc +++ b/table/block_based/block_based_table_reader.cc @@ -898,11 +898,13 @@ Status BlockBasedTable::PrefetchIndexAndFilterBlocks( // Find filter handle and filter type if (rep_->filter_policy) { - for (const auto& [filter_type, prefix] : + for (const auto& pair : {std::make_pair(Rep::FilterType::kFullFilter, kFullFilterBlockPrefix), std::make_pair(Rep::FilterType::kPartitionedFilter, kPartitionedFilterBlockPrefix), std::make_pair(Rep::FilterType::kBlockFilter, kFilterBlockPrefix)}) { + filter_type = pair.first; + Slice prefix = pair.second; meta_iter->Seek(prefix); if (meta_iter->status().ok() && meta_iter->Valid()) { Slice key = meta_iter->key();