Lines Matching refs:rep_
79 delete rep_; in ~BlockBasedTable()
225 Statistics* const statistics = rep_->ioptions.statistics; in UpdateCacheHitMetrics()
229 static_cast<uint32_t>(rep_->level)); in UpdateCacheHitMetrics()
283 Statistics* const statistics = rep_->ioptions.statistics; in UpdateCacheMissMetrics()
287 static_cast<uint32_t>(rep_->level)); in UpdateCacheMissMetrics()
336 Statistics* const statistics = rep_->ioptions.statistics; in UpdateCacheInsertionMetrics()
397 auto cache_handle = block_cache->Lookup(key, rep_->ioptions.statistics); in GetEntryFromCache()
742 Status s = ReadProperties(handle_value, rep_->file.get(), prefetch_buffer, in TryReadPropertiesWithGlobalSeqno()
743 rep_->footer, rep_->ioptions, table_properties, in TryReadPropertiesWithGlobalSeqno()
759 s = ROCKSDB_NAMESPACE::VerifyChecksum(rep_->footer.checksum(), in TryReadPropertiesWithGlobalSeqno()
773 ROCKS_LOG_WARN(rep_->ioptions.info_log, in ReadPropertiesBlock()
781 meta_iter->value(), rep_->file.get(), prefetch_buffer, rep_->footer, in ReadPropertiesBlock()
782 rep_->ioptions, &table_properties, true /* verify_checksum */, in ReadPropertiesBlock()
797 ROCKS_LOG_WARN(rep_->ioptions.info_log, in ReadPropertiesBlock()
803 rep_->table_properties.reset(props_guard.release()); in ReadPropertiesBlock()
804 rep_->blocks_maybe_compressed = in ReadPropertiesBlock()
805 rep_->table_properties->compression_name != in ReadPropertiesBlock()
807 rep_->blocks_definitely_zstd_compressed = in ReadPropertiesBlock()
808 (rep_->table_properties->compression_name == in ReadPropertiesBlock()
810 rep_->table_properties->compression_name == in ReadPropertiesBlock()
814 ROCKS_LOG_ERROR(rep_->ioptions.info_log, in ReadPropertiesBlock()
818 if (rep_->table_properties) { in ReadPropertiesBlock()
819 ParseSliceTransform(rep_->table_properties->prefix_extractor_name, in ReadPropertiesBlock()
820 &(rep_->table_prefix_extractor)); in ReadPropertiesBlock()
825 if (rep_->table_properties) { in ReadPropertiesBlock()
826 rep_->whole_key_filtering &= in ReadPropertiesBlock()
827 IsFeatureSupported(*(rep_->table_properties), in ReadPropertiesBlock()
829 rep_->ioptions.info_log); in ReadPropertiesBlock()
830 rep_->prefix_filtering &= in ReadPropertiesBlock()
831 IsFeatureSupported(*(rep_->table_properties), in ReadPropertiesBlock()
833 rep_->ioptions.info_log); in ReadPropertiesBlock()
835 rep_->index_key_includes_seq = in ReadPropertiesBlock()
836 rep_->table_properties->index_key_is_user_key == 0; in ReadPropertiesBlock()
837 rep_->index_value_is_full = in ReadPropertiesBlock()
838 rep_->table_properties->index_value_is_delta_encoded == 0; in ReadPropertiesBlock()
843 auto& props = rep_->table_properties->user_collected_properties; in ReadPropertiesBlock()
846 rep_->index_type = static_cast<BlockBasedTableOptions::IndexType>( in ReadPropertiesBlock()
850 rep_->index_has_first_key = in ReadPropertiesBlock()
851 rep_->index_type == BlockBasedTableOptions::kBinarySearchWithFirstKey; in ReadPropertiesBlock()
853 s = GetGlobalSequenceNumber(*(rep_->table_properties), largest_seqno, in ReadPropertiesBlock()
854 &(rep_->global_seqno)); in ReadPropertiesBlock()
856 ROCKS_LOG_ERROR(rep_->ioptions.info_log, "%s", s.ToString().c_str()); in ReadPropertiesBlock()
872 rep_->ioptions.info_log, in ReadRangeDelBlock()
885 rep_->ioptions.info_log, in ReadRangeDelBlock()
889 rep_->fragmented_range_dels = in ReadRangeDelBlock()
905 if (rep_->filter_policy) { in PrefetchIndexAndFilterBlocks()
924 filter_block_key.append(rep_->filter_policy->Name()); in PrefetchIndexAndFilterBlocks()
925 if (FindMetaBlock(meta_iter, filter_block_key, &rep_->filter_handle) in PrefetchIndexAndFilterBlocks()
927 rep_->filter_type = filter_type; in PrefetchIndexAndFilterBlocks()
936 &rep_->compression_dict_handle); in PrefetchIndexAndFilterBlocks()
941 BlockBasedTableOptions::IndexType index_type = rep_->index_type; in PrefetchIndexAndFilterBlocks()
947 rep_->table_options.pin_l0_filter_and_index_blocks_in_cache && level == 0; in PrefetchIndexAndFilterBlocks()
967 rep_->index_reader = std::move(index_reader); in PrefetchIndexAndFilterBlocks()
973 rep_->index_reader->CacheDependencies(pin_all); in PrefetchIndexAndFilterBlocks()
980 rep_->filter_type == Rep::FilterType::kPartitionedFilter); in PrefetchIndexAndFilterBlocks()
986 rep_->filter_type == Rep::FilterType::kPartitionedFilter); in PrefetchIndexAndFilterBlocks()
988 if (rep_->filter_policy) { in PrefetchIndexAndFilterBlocks()
998 rep_->filter = std::move(filter); in PrefetchIndexAndFilterBlocks()
1002 if (!rep_->compression_dict_handle.IsNull()) { in PrefetchIndexAndFilterBlocks()
1011 rep_->uncompression_dict_reader = std::move(uncompression_dict_reader); in PrefetchIndexAndFilterBlocks()
1019 switch (rep_->ioptions.access_hint_on_compaction_start) { in SetupForCompaction()
1023 rep_->file->file()->Hint(FSRandomAccessFile::kNormal); in SetupForCompaction()
1026 rep_->file->file()->Hint(FSRandomAccessFile::kSequential); in SetupForCompaction()
1029 rep_->file->file()->Hint(FSRandomAccessFile::kWillNeed); in SetupForCompaction()
1038 return rep_->table_properties; in GetTableProperties()
1043 if (rep_->filter) { in ApproximateMemoryUsage()
1044 usage += rep_->filter->ApproximateMemoryUsage(); in ApproximateMemoryUsage()
1046 if (rep_->index_reader) { in ApproximateMemoryUsage()
1047 usage += rep_->index_reader->ApproximateMemoryUsage(); in ApproximateMemoryUsage()
1049 if (rep_->uncompression_dict_reader) { in ApproximateMemoryUsage()
1050 usage += rep_->uncompression_dict_reader->ApproximateMemoryUsage(); in ApproximateMemoryUsage()
1066 rep_->file.get(), prefetch_buffer, rep_->footer, ReadOptions(), in ReadMetaIndexBlock()
1067 rep_->footer.metaindex_handle(), &metaindex, rep_->ioptions, in ReadMetaIndexBlock()
1069 UncompressionDict::GetEmptyDict(), rep_->persistent_cache_options, in ReadMetaIndexBlock()
1070 0 /* read_amp_bytes_per_bit */, GetMemoryAllocator(rep_->table_options), in ReadMetaIndexBlock()
1071 false /* for_compaction */, rep_->blocks_definitely_zstd_compressed, in ReadMetaIndexBlock()
1075 ROCKS_LOG_ERROR(rep_->ioptions.info_log, in ReadMetaIndexBlock()
1099 ? rep_->table_options.read_amp_bytes_per_bit in GetDataBlockFromCache()
1131 Statistics* statistics = rep_->ioptions.statistics; in GetDataBlockFromCache()
1153 &contents, rep_->table_options.format_version, rep_->ioptions, in GetDataBlockFromCache()
1154 GetMemoryAllocator(rep_->table_options)); in GetDataBlockFromCache()
1161 rep_->blocks_definitely_zstd_compressed, in GetDataBlockFromCache()
1162 rep_->table_options.filter_policy.get())); // uncompressed block in GetDataBlockFromCache()
1199 const ImmutableCFOptions& ioptions = rep_->ioptions; in PutDataBlockToCache()
1200 const uint32_t format_version = rep_->table_options.format_version; in PutDataBlockToCache()
1203 ? rep_->table_options.read_amp_bytes_per_bit in PutDataBlockToCache()
1206 rep_->table_options.cache_index_and_filter_blocks_with_high_priority && in PutDataBlockToCache()
1234 statistics, rep_->blocks_definitely_zstd_compressed, in PutDataBlockToCache()
1235 rep_->table_options.filter_policy.get())); in PutDataBlockToCache()
1239 rep_->blocks_definitely_zstd_compressed, in PutDataBlockToCache()
1240 rep_->table_options.filter_policy.get())); in PutDataBlockToCache()
1295 auto& rep = rep_; in CreateFilterBlockReader()
1330 assert(rep_ != nullptr); in NewIndexIterator()
1331 assert(rep_->index_reader != nullptr); in NewIndexIterator()
1335 return rep_->index_reader->NewIterator(read_options, disable_prefix_seek, in NewIndexIterator()
1378 Cache* block_cache = rep_->table_options.block_cache.get(); in MaybeReadBlockAndLoadToCache()
1381 rep_->immortal_table ? nullptr in MaybeReadBlockAndLoadToCache()
1382 : rep_->table_options.block_cache_compressed.get(); in MaybeReadBlockAndLoadToCache()
1396 key = GetCacheKey(rep_->cache_key_prefix, rep_->cache_key_prefix_size, in MaybeReadBlockAndLoadToCache()
1401 ckey = GetCacheKey(rep_->compressed_cache_key_prefix, in MaybeReadBlockAndLoadToCache()
1402 rep_->compressed_cache_key_prefix_size, handle, in MaybeReadBlockAndLoadToCache()
1420 Statistics* statistics = rep_->ioptions.statistics; in MaybeReadBlockAndLoadToCache()
1424 rep_->blocks_maybe_compressed; in MaybeReadBlockAndLoadToCache()
1429 StopWatch sw(rep_->ioptions.env, statistics, READ_BLOCK_GET_MICROS); in MaybeReadBlockAndLoadToCache()
1431 rep_->file.get(), prefetch_buffer, rep_->footer, ro, handle, in MaybeReadBlockAndLoadToCache()
1432 &raw_block_contents, rep_->ioptions, do_uncompress, in MaybeReadBlockAndLoadToCache()
1434 rep_->persistent_cache_options, in MaybeReadBlockAndLoadToCache()
1435 GetMemoryAllocator(rep_->table_options), in MaybeReadBlockAndLoadToCache()
1436 GetMemoryAllocatorForCompressedBlock(rep_->table_options)); in MaybeReadBlockAndLoadToCache()
1450 GetMemoryAllocator(rep_->table_options), block_type, get_context); in MaybeReadBlockAndLoadToCache()
1463 rep_->table_options.block_restart_interval * in MaybeReadBlockAndLoadToCache()
1503 rep_->ioptions.env->NowMicros(), in MaybeReadBlockAndLoadToCache()
1505 /*block_size=*/usage, rep_->cf_id_for_tracing(), in MaybeReadBlockAndLoadToCache()
1506 /*cf_name=*/"", rep_->level_for_tracing(), in MaybeReadBlockAndLoadToCache()
1507 rep_->sst_number_for_tracing(), lookup_context->caller, is_cache_hit, in MaybeReadBlockAndLoadToCache()
1512 rep_->cf_name_for_tracing(), in MaybeReadBlockAndLoadToCache()
1544 RandomAccessFileReader* file = rep_->file.get(); in RetrieveMultipleBlocks()
1545 const Footer& footer = rep_->footer; in RetrieveMultipleBlocks()
1546 const ImmutableCFOptions& ioptions = rep_->ioptions; in RetrieveMultipleBlocks()
1547 size_t read_amp_bytes_per_bit = rep_->table_options.read_amp_bytes_per_bit; in RetrieveMultipleBlocks()
1548 MemoryAllocator* memory_allocator = GetMemoryAllocator(rep_->table_options); in RetrieveMultipleBlocks()
1652 "truncated block read from " + rep_->file->file_name() + in RetrieveMultipleBlocks()
1662 "truncated block read from " + rep_->file->file_name() + " offset " + in RetrieveMultipleBlocks()
1714 CopyBufferToHeap(GetMemoryAllocator(rep_->table_options), raw), in RetrieveMultipleBlocks()
1752 rep_->ioptions, memory_allocator); in RetrieveMultipleBlocks()
1807 rep_->blocks_maybe_compressed; in RetrieveBlock()
1812 StopWatch sw(rep_->ioptions.env, rep_->ioptions.statistics, in RetrieveBlock()
1815 rep_->file.get(), prefetch_buffer, rep_->footer, ro, handle, &block, in RetrieveBlock()
1816 rep_->ioptions, do_uncompress, maybe_compressed, block_type, in RetrieveBlock()
1817 uncompression_dict, rep_->persistent_cache_options, in RetrieveBlock()
1819 ? rep_->table_options.read_amp_bytes_per_bit in RetrieveBlock()
1821 GetMemoryAllocator(rep_->table_options), for_compaction, in RetrieveBlock()
1822 rep_->blocks_definitely_zstd_compressed, in RetrieveBlock()
1823 rep_->table_options.filter_policy.get()); in RetrieveBlock()
1914 if (!rep_->filter_policy) { in PrefixMayMatch()
1920 if (rep_->table_prefix_extractor == nullptr) { in PrefixMayMatch()
1926 prefix_extractor = rep_->table_prefix_extractor.get(); in PrefixMayMatch()
1937 FilterBlockReader* const filter = rep_->filter.get(); in PrefixMayMatch()
1946 rep_->internal_comparator.user_comparator(), const_ikey_ptr, in PrefixMayMatch()
1978 } else if ((rep_->index_key_includes_seq ? ExtractUserKey(iiter->key()) in PrefixMayMatch()
2007 Statistics* statistics = rep_->ioptions.statistics; in PrefixMayMatch()
2025 PrefixExtractorChanged(rep_->table_properties.get(), prefix_extractor); in NewIterator()
2029 rep_->index_type == BlockBasedTableOptions::kHashSearch, in NewIterator()
2033 this, read_options, rep_->internal_comparator, std::move(index_iter), in NewIterator()
2041 this, read_options, rep_->internal_comparator, std::move(index_iter), in NewIterator()
2051 if (rep_->fragmented_range_dels == nullptr) { in NewRangeTombstoneIterator()
2059 rep_->fragmented_range_dels, rep_->internal_comparator, snapshot); in NewRangeTombstoneIterator()
2073 if (rep_->whole_key_filtering) { in FullFilterKeyMayMatch()
2075 rep_->internal_comparator.user_comparator()->timestamp_size(); in FullFilterKeyMayMatch()
2081 rep_->table_properties->prefix_extractor_name.compare( in FullFilterKeyMayMatch()
2091 RecordTick(rep_->ioptions.statistics, BLOOM_FILTER_FULL_POSITIVE); in FullFilterKeyMayMatch()
2092 PERF_COUNTER_BY_LEVEL_ADD(bloom_filter_full_positive, 1, rep_->level); in FullFilterKeyMayMatch()
2105 if (rep_->whole_key_filtering) { in FullFilterKeysMayMatch()
2109 rep_->table_properties->prefix_extractor_name.compare( in FullFilterKeysMayMatch()
2126 !skip_filters ? rep_->filter.get() : nullptr; in Get()
2144 RecordTick(rep_->ioptions.statistics, BLOOM_FILTER_USEFUL); in Get()
2145 PERF_COUNTER_BY_LEVEL_ADD(bloom_filter_useful, 1, rep_->level); in Get()
2151 if (rep_->index_type == BlockBasedTableOptions::kHashSearch) { in Get()
2153 rep_->table_properties.get(), prefix_extractor); in Get()
2164 rep_->internal_comparator.user_comparator()->timestamp_size(); in Get()
2181 RecordTick(rep_->ioptions.statistics, BLOOM_FILTER_USEFUL); in Get()
2182 PERF_COUNTER_BY_LEVEL_ADD(bloom_filter_useful, 1, rep_->level); in Get()
2187 UserComparatorWrapper(rep_->internal_comparator.user_comparator()) in Get()
2260 rep_->ioptions.env->NowMicros(), in Get()
2262 lookup_data_block_context.block_size, rep_->cf_id_for_tracing(), in Get()
2263 /*cf_name=*/"", rep_->level_for_tracing(), in Get()
2264 rep_->sst_number_for_tracing(), lookup_data_block_context.caller, in Get()
2274 rep_->cf_name_for_tracing(), referenced_key); in Get()
2283 RecordTick(rep_->ioptions.statistics, BLOOM_FILTER_FULL_TRUE_POSITIVE); in Get()
2285 rep_->level); in Get()
2301 !skip_filters ? rep_->filter.get() : nullptr; in MultiGet()
2323 if (rep_->index_type == BlockBasedTableOptions::kHashSearch) { in MultiGet()
2325 rep_->table_properties.get(), prefix_extractor); in MultiGet()
2347 if (rep_->uncompression_dict_reader) { in MultiGet()
2349 rep_->uncompression_dict_reader->GetOrReadUncompressionDictionary( in MultiGet()
2374 UserComparatorWrapper(rep_->internal_comparator.user_comparator()) in MultiGet()
2435 if (rep_->table_options.block_cache_compressed == nullptr && in MultiGet()
2436 rep_->blocks_maybe_compressed) { in MultiGet()
2483 UserComparatorWrapper(rep_->internal_comparator.user_comparator()) in MultiGet()
2532 Cache* block_cache = rep_->table_options.block_cache.get(); in MultiGet()
2565 rep_->ioptions.env->NowMicros(), in MultiGet()
2567 lookup_data_block_context.block_size, rep_->cf_id_for_tracing(), in MultiGet()
2568 /*cf_name=*/"", rep_->level_for_tracing(), in MultiGet()
2569 rep_->sst_number_for_tracing(), lookup_data_block_context.caller, in MultiGet()
2579 rep_->cf_name_for_tracing(), referenced_key); in MultiGet()
2594 RecordTick(rep_->ioptions.statistics, BLOOM_FILTER_FULL_TRUE_POSITIVE); in MultiGet()
2596 rep_->level); in MultiGet()
2608 auto& comparator = rep_->internal_comparator; in Prefetch()
2635 const bool is_user_key = !rep_->index_key_includes_seq; in Prefetch()
2712 rep_->file.get(), readahead_size /* readadhead_size */, in VerifyChecksumInBlocks()
2714 !rep_->ioptions.allow_mmap_reads /* enable */); in VerifyChecksumInBlocks()
2724 rep_->file.get(), &prefetch_buffer, rep_->footer, ReadOptions(), handle, in VerifyChecksumInBlocks()
2725 &contents, rep_->ioptions, false /* decompress */, in VerifyChecksumInBlocks()
2727 UncompressionDict::GetEmptyDict(), rep_->persistent_cache_options); in VerifyChecksumInBlocks()
2782 rep_->file.get(), nullptr /* prefetch buffer */, rep_->footer, in VerifyChecksumInMetaBlocks()
2783 ReadOptions(), handle, &contents, rep_->ioptions, in VerifyChecksumInMetaBlocks()
2786 UncompressionDict::GetEmptyDict(), rep_->persistent_cache_options); in VerifyChecksumInMetaBlocks()
2803 assert(rep_ != nullptr); in TEST_BlockInCache()
2805 Cache* const cache = rep_->table_options.block_cache.get(); in TEST_BlockInCache()
2812 GetCacheKey(rep_->cache_key_prefix, rep_->cache_key_prefix_size, handle, in TEST_BlockInCache()
2853 switch (rep_->index_type) { in CreateIndexReader()
2871 if (rep_->internal_prefix_transform.get() == nullptr) { in CreateIndexReader()
2872 ROCKS_LOG_WARN(rep_->ioptions.info_log, in CreateIndexReader()
2882 ROCKS_LOG_WARN(rep_->ioptions.info_log, in CreateIndexReader()
2902 "Unrecognized index type: " + ToString(rep_->index_type); in CreateIndexReader()
2918 if (rep_->table_properties) { in ApproximateOffsetOf()
2919 result = rep_->table_properties->data_size; in ApproximateOffsetOf()
2923 result = rep_->footer.metaindex_handle().offset(); in ApproximateOffsetOf()
2951 assert(rep_->internal_comparator.Compare(start, end) <= 0); in ApproximateSize()
2976 assert(rep_ != nullptr); in TEST_FilterBlockInCache()
2977 return TEST_BlockInCache(rep_->filter_handle); in TEST_FilterBlockInCache()
2981 assert(rep_ != nullptr); in TEST_IndexBlockInCache()
2983 return TEST_BlockInCache(rep_->footer.index_handle()); in TEST_IndexBlockInCache()
3047 out_file->Append(rep_->footer.ToString().c_str()); in DumpTable()
3092 table_properties = rep_->table_properties.get(); in DumpTable()
3103 if (rep_->filter) { in DumpTable()
3108 out_file->Append(rep_->filter->ToString().c_str()); in DumpTable()
3119 if (rep_->uncompression_dict_reader) { in DumpTable()
3121 s = rep_->uncompression_dict_reader->GetOrReadUncompressionDictionary( in DumpTable()
3190 if (!rep_->index_key_includes_seq) { in DumpIndexBlock()
3201 .ToString(true, rep_->index_has_first_key) in DumpIndexBlock()