Skip to content

Commit

Permalink
refactor(storage): remove reading range tombstone in read path and co…
Browse files Browse the repository at this point in the history
…mpaction (#15613)
  • Loading branch information
wenym1 authored Mar 15, 2024
1 parent 3bca9de commit 9b84ae0
Show file tree
Hide file tree
Showing 16 changed files with 84 additions and 1,285 deletions.
8 changes: 3 additions & 5 deletions src/storage/benches/bench_compactor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ use risingwave_common::util::value_encoding::column_aware_row_encoding::ColumnAw
use risingwave_common::util::value_encoding::ValueRowSerializer;
use risingwave_hummock_sdk::key::FullKey;
use risingwave_hummock_sdk::key_range::KeyRange;
use risingwave_hummock_sdk::HummockEpoch;
use risingwave_object_store::object::object_metrics::ObjectStoreMetrics;
use risingwave_object_store::object::{InMemObjectStore, ObjectStore, ObjectStoreImpl};
use risingwave_pb::hummock::{compact_task, SstableInfo, TableSchema};
Expand All @@ -36,7 +35,7 @@ use risingwave_storage::hummock::compactor::{
ConcatSstableIterator, DummyCompactionFilter, TaskConfig, TaskProgress,
};
use risingwave_storage::hummock::iterator::{
ConcatIterator, Forward, ForwardMergeRangeIterator, HummockIterator, MergeIterator,
ConcatIterator, Forward, HummockIterator, MergeIterator,
};
use risingwave_storage::hummock::multi_builder::{
CapacitySplitTableBuilder, LocalTableBuilderFactory,
Expand All @@ -45,8 +44,8 @@ use risingwave_storage::hummock::sstable::SstableIteratorReadOptions;
use risingwave_storage::hummock::sstable_store::SstableStoreRef;
use risingwave_storage::hummock::value::HummockValue;
use risingwave_storage::hummock::{
CachePolicy, CompactionDeleteRangeIterator, FileCache, SstableBuilder, SstableBuilderOptions,
SstableIterator, SstableStore, SstableStoreConfig, SstableWriterOptions, Xor16FilterBuilder,
CachePolicy, FileCache, SstableBuilder, SstableBuilderOptions, SstableIterator, SstableStore,
SstableStoreConfig, SstableWriterOptions, Xor16FilterBuilder,
};
use risingwave_storage::monitor::{
global_hummock_state_store_metrics, CompactorMetrics, StoreLocalStatistic,
Expand Down Expand Up @@ -273,7 +272,6 @@ async fn compact<I: HummockIterator<Direction = Forward>>(
});
compact_and_build_sst(
&mut builder,
CompactionDeleteRangeIterator::new(ForwardMergeRangeIterator::new(HummockEpoch::MAX)),
&task_config,
Arc::new(CompactorMetrics::unused()),
iter,
Expand Down
10 changes: 0 additions & 10 deletions src/storage/src/hummock/compactor/compaction_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -394,12 +394,6 @@ pub async fn check_compaction_result(
u64::MAX,
0,
None,
del_iter,
);
let mut del_iter = ForwardMergeRangeIterator::default();
del_iter.add_concat_iter(
compact_task.sorted_output_ssts.clone(),
context.sstable_store.clone(),
);
let iter = ConcatSstableIterator::new(
compact_task.existing_table_ids.clone(),
Expand All @@ -415,7 +409,6 @@ pub async fn check_compaction_result(
u64::MAX,
0,
None,
del_iter,
);

check_result(left_iter, right_iter).await
Expand All @@ -427,8 +420,6 @@ pub async fn check_flush_result<I: HummockIterator<Direction = Forward>>(
sort_ssts: Vec<SstableInfo>,
context: CompactorContext,
) -> HummockResult<bool> {
let mut del_iter = ForwardMergeRangeIterator::default();
del_iter.add_concat_iter(sort_ssts.clone(), context.sstable_store.clone());
let iter = ConcatSstableIterator::new(
existing_table_ids.clone(),
sort_ssts.clone(),
Expand All @@ -443,7 +434,6 @@ pub async fn check_flush_result<I: HummockIterator<Direction = Forward>>(
u64::MAX,
0,
None,
del_iter,
);
check_result(left_iter, right_iter).await
}
Expand Down
Loading

0 comments on commit 9b84ae0

Please sign in to comment.