Skip to content

Commit

Permalink
Update pageserver/src/tenant/storage_layer/merge_iterator.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Christian Schwarz <christian@neon.tech>
  • Loading branch information
skyzh and problame committed Jul 5, 2024
1 parent 50b3360 commit c27ce4f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pageserver/src/tenant/storage_layer/merge_iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@ impl LayerIterRef<'_> {
}
}

/// This type plays several roles at once
/// 1. Unified iterator for image and delta layers.
/// 2. `Ord` for use in [`MergeIterator::heap`] (for the k-merge).
/// 3. Lazy creation of the real delta/image iterator.
enum IteratorWrapper<'a> {
/// The potential next key of the iterator. If the layer is not loaded yet, it will be the start key encoded in the layer file.
/// Otherwise, it is the next key of the real iterator.
NotLoaded {
ctx: &'a RequestContext,
first_key_lower_bound: (Key, Lsn),
Expand Down

0 comments on commit c27ce4f

Please sign in to comment.