Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement an SST iterator #48

Merged
merged 2 commits into from
May 10, 2024
Merged

Implement an SST iterator #48

merged 2 commits into from
May 10, 2024

Conversation

paulgb
Copy link
Contributor

@paulgb paulgb commented May 10, 2024

As a prereq to #8, we need a way to iterate over an SST. This builds on top of the existing block iterator.

Since a BlockIterator holds a reference to a Block, it needs to live for at least as long as the block. When iterating over an entire SST, the easiest way to do this is to have the BlockIterator own the block. I opted here to create a BlockLike trait which is implemented for both Block and &Block. I suspect that once we start caching reads, we will want to pass around reference-counted Block values instead, but this approach lets us defer that discussion until later.

@paulgb paulgb requested a review from criccomini May 10, 2024 15:41
@criccomini
Copy link
Collaborator

cc @gesalous, who's working on the block cache in #15

@criccomini
Copy link
Collaborator

Yep, yep. This is great. Agreed that the page cache will probably get implemented inside of TableStore. As you say, we can cross that bridge later. This is excellent. Thanks for keeping the momentum going!

@criccomini criccomini merged commit 005555e into main May 10, 2024
3 checks passed
@criccomini criccomini deleted the paulgb/sst-iterator branch May 10, 2024 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants