Skip to content

Commit

Permalink
use new table id interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Liang Zhao committed Mar 16, 2023
1 parent df7c427 commit 59ae3ae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/storage/src/hummock/compactor/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ impl SstableStreamIterator {
if self
.sstable_info
.get_table_ids()
.binary_search(&block_iter.key().user_key.table_id.table_id)
.binary_search(&block_iter.table_id().table_id)
.is_ok()
{
return Ok(());
Expand Down
6 changes: 5 additions & 1 deletion src/storage/src/hummock/sstable/block_iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,14 @@ impl BlockIterator {
self.try_prev_inner()
}

pub fn table_id(&self) -> TableId {
self.block.table_id()
}

pub fn key(&self) -> FullKey<&[u8]> {
assert!(self.is_valid());

FullKey::from_slice_without_table_id(self.block.table_id(), &self.key[..])
FullKey::from_slice_without_table_id(self.table_id(), &self.key[..])
}

pub fn value(&self) -> &[u8] {
Expand Down

0 comments on commit 59ae3ae

Please sign in to comment.