From 1aab5b32ad3c06f53cd5c1fcd410df4ba8da418e Mon Sep 17 00:00:00 2001 From: Bo Wang Date: Fri, 29 Jul 2022 11:32:54 -0700 Subject: [PATCH] Update passing rate_limiter_priority for a PartitionedFilterBlockReader function to FS (#10438) Summary: Add param rate_limiter_parameter in PartitionedFilterBlockReader::GetFilterPartitionBlock . Pull Request resolved: https://github.com/facebook/rocksdb/pull/10438 Test Plan: Unit Tests. Reviewed By: anand1976 Differential Revision: D38266395 Pulled By: gitbw95 fbshipit-source-id: 3ed062a3b43d6df323371cb0d266f7fe869e9ad2 --- table/block_based/partitioned_filter_block.cc | 7 +++++-- table/block_based/partitioned_filter_block.h | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/table/block_based/partitioned_filter_block.cc b/table/block_based/partitioned_filter_block.cc index cad1243b6..6e4e9dabd 100644 --- a/table/block_based/partitioned_filter_block.cc +++ b/table/block_based/partitioned_filter_block.cc @@ -288,6 +288,7 @@ Status PartitionedFilterBlockReader::GetFilterPartitionBlock( FilePrefetchBuffer* prefetch_buffer, const BlockHandle& fltr_blk_handle, bool no_io, GetContext* get_context, BlockCacheLookupContext* lookup_context, + Env::IOPriority rate_limiter_priority, CachableEntry* filter_block) const { assert(table()); assert(filter_block); @@ -304,6 +305,7 @@ Status PartitionedFilterBlockReader::GetFilterPartitionBlock( } ReadOptions read_options; + read_options.rate_limiter_priority = rate_limiter_priority; if (no_io) { read_options.read_tier = kBlockCacheTier; } @@ -344,7 +346,7 @@ bool PartitionedFilterBlockReader::MayMatch( CachableEntry filter_partition_block; s = GetFilterPartitionBlock(nullptr /* prefetch_buffer */, filter_handle, no_io, get_context, lookup_context, - &filter_partition_block); + rate_limiter_priority, &filter_partition_block); if (UNLIKELY(!s.ok())) { IGNORE_STATUS_IF_ERROR(s); return true; @@ -419,7 +421,8 @@ void PartitionedFilterBlockReader::MayMatchPartition( CachableEntry filter_partition_block; Status s = GetFilterPartitionBlock( nullptr /* prefetch_buffer */, filter_handle, no_io, - range->begin()->get_context, lookup_context, &filter_partition_block); + range->begin()->get_context, lookup_context, rate_limiter_priority, + &filter_partition_block); if (UNLIKELY(!s.ok())) { IGNORE_STATUS_IF_ERROR(s); return; // Any/all may match diff --git a/table/block_based/partitioned_filter_block.h b/table/block_based/partitioned_filter_block.h index b32abd0c0..955b50739 100644 --- a/table/block_based/partitioned_filter_block.h +++ b/table/block_based/partitioned_filter_block.h @@ -137,6 +137,7 @@ class PartitionedFilterBlockReader : public FilterBlockReaderCommon { FilePrefetchBuffer* prefetch_buffer, const BlockHandle& handle, bool no_io, GetContext* get_context, BlockCacheLookupContext* lookup_context, + Env::IOPriority rate_limiter_priority, CachableEntry* filter_block) const; using FilterFunction = bool (FullFilterBlockReader::*)(