Skip to content

Commit 3cfc5df

Browse files
committed
trace SstableStreamIterator
1 parent 5937105 commit 3cfc5df

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/storage/src/hummock/compactor/iterator.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ use std::sync::atomic::AtomicU64;
1919
use std::sync::{atomic, Arc};
2020
use std::time::Instant;
2121

22+
use await_tree::InstrumentAwait;
2223
use risingwave_hummock_sdk::compaction_group::StateTableId;
2324
use risingwave_hummock_sdk::key::FullKey;
2425
use risingwave_hummock_sdk::key_range::KeyRange;
@@ -127,7 +128,7 @@ impl SstableStreamIterator {
127128
/// `self.block_iter` to `None`.
128129
async fn next_block(&mut self) -> HummockResult<()> {
129130
// Check if we want and if we can load the next block.
130-
if self.remaining_blocks > 0 && let Some(block) = self.download_next_block().await? {
131+
if self.remaining_blocks > 0 && let Some(block) = self.download_next_block().verbose_instrument_await("stream_iter_next_block").await? {
131132
let mut block_iter = BlockIterator::new(BlockHolder::from_owned_block(block));
132133
block_iter.seek_to_first();
133134

@@ -280,6 +281,7 @@ impl ConcatSstableIterator {
280281
let sstable = self
281282
.sstable_store
282283
.sstable(table_info, &mut self.stats)
284+
.verbose_instrument_await("stream_iter_sstable")
283285
.await?;
284286
let stats_ptr = self.stats.remote_io_time.clone();
285287
let now = Instant::now();
@@ -323,6 +325,7 @@ impl ConcatSstableIterator {
323325
let block_stream = self
324326
.sstable_store
325327
.get_stream(sstable.value(), Some(start_index))
328+
.verbose_instrument_await("stream_iter_get_stream")
326329
.await?;
327330

328331
// Determine time needed to open stream.

0 commit comments

Comments
 (0)