summaryrefslogtreecommitdiff
path: root/db/table_cache.h
diff options
context:
space:
mode:
authoranand76 <anand76@devvm4702.ftw0.facebook.com>2022-08-09 14:44:47 -0700
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>2022-08-09 14:44:47 -0700
commit0b02960d8cb76f74a0487cc352f296cd7709f558 (patch)
treed3b9936ace743012291b151ab28a152bac722d2d /db/table_cache.h
parent06b04127a836ef67b1c6ec3d906668ed4fb199ec (diff)
Fix MultiGet range deletion handling and a memory leak (#10513)
Summary: This PR fixes 2 bugs introduced in https://github.com/facebook/rocksdb/issues/10432 - 1. If the bloom filter returned a negative result for all MultiGet keys in a file, the range tombstones in that file were being ignored, resulting in incorrect results if those tombstones covered a key in a higher level. 2. If all the keys in a file were filtered out in `TableCache::MultiGetFilter`, the table cache handle was not being released. Pull Request resolved: https://github.com/facebook/rocksdb/pull/10513 Test Plan: Add a new unit test that fails without this fix Reviewed By: akankshamahajan15 Differential Revision: D38548739 Pulled By: anand1976 fbshipit-source-id: a741a1e25d2e991d63f038100f126c2dc404a87c
Diffstat (limited to 'db/table_cache.h')
-rw-r--r--db/table_cache.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/db/table_cache.h b/db/table_cache.h
index 9c9342309..dae47ede0 100644
--- a/db/table_cache.h
+++ b/db/table_cache.h
@@ -235,6 +235,11 @@ class TableCache {
size_t max_file_size_for_l0_meta_pin = 0,
Temperature file_temperature = Temperature::kUnknown);
+ // Update the max_covering_tombstone_seq in the GetContext for each key based
+ // on the range deletions in the table
+ void UpdateRangeTombstoneSeqnums(const ReadOptions& options, TableReader* t,
+ MultiGetContext::Range& table_range);
+
// Create a key prefix for looking up the row cache. The prefix is of the
// format row_cache_id + fd_number + seq_no. Later, the user key can be
// appended to form the full key