From 7004e454899490f16e0a2e5fd2e26f10d01ef091 Mon Sep 17 00:00:00 2001 From: Andrew Kryczka Date: Thu, 26 Apr 2018 14:33:02 -0700 Subject: [PATCH] Remove block-based table assertion for non-empty filter block Summary: 7a6353bd1c516fe3f7118248c77035697c5ac247 prevents empty filter blocks from being written for SST files containing range deletions only. However the assertion this PR removes is still a problem as we could be reading from a DB generated by a RocksDB build without the 7a6353bd1c516fe3f7118248c77035697c5ac247 patch. So remove the assertion. We already don't do this check when `cache_index_and_filter_blocks=false`, so it should be safe. Closes https://github.com/facebook/rocksdb/pull/3773 Differential Revision: D7769964 Pulled By: ajkr fbshipit-source-id: 7285762446f2cd2ccf16efd7a988a106fbb0d8d3 --- table/block_based_table_reader.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/table/block_based_table_reader.cc b/table/block_based_table_reader.cc index 7579a4234..9b554da5b 100644 --- a/table/block_based_table_reader.cc +++ b/table/block_based_table_reader.cc @@ -1332,7 +1332,6 @@ BlockBasedTable::CachableEntry BlockBasedTable::GetFilter( filter = ReadFilter(prefetch_buffer, filter_blk_handle, is_a_filter_partition); if (filter != nullptr) { - assert(filter->size() > 0); Status s = block_cache->Insert( key, filter, filter->size(), &DeleteCachedFilterEntry, &cache_handle, rep_->table_options.cache_index_and_filter_blocks_with_high_priority