pub struct MiniBlockScheduler { /* private fields */ }
Expand description
A scheduler for a page that has been encoded with the mini-block layout
Scheduling mini-block encoded data is simple in concept and somewhat complex in practice.
First, during initialization, we load the chunk metadata, the repetition index, and the dictionary (these last two may not be present)
Then, during scheduling, we use the user’s requested row ranges and the repetition index to determine which chunks we need and which rows we need from those chunks.
For example, if the repetition index is: [50, 3], [50, 0], [10, 0] and the range from the user is 40..60 then we need to:
- Read the first chunk and skip the first 40 rows, then read 10 full rows, and then read 3 items for the 11th row of our range.
- Read the second chunk and read the remaining items in our 11th row and then read the remaining 9 full rows.
Then, if we are going to decode that in batches of 5, we need to make decode tasks. The first two decode tasks will just need the first chunk. The third decode task will need the first chunk (for the trailer which has the 11th row in our range) and the second chunk. The final decode task will just need the second chunk.
The above prose descriptions are what are represented by [ChunkInstructions
] and
[ChunkDrainInstructions
].
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MiniBlockScheduler
impl !RefUnwindSafe for MiniBlockScheduler
impl Send for MiniBlockScheduler
impl Sync for MiniBlockScheduler
impl Unpin for MiniBlockScheduler
impl !UnwindSafe for MiniBlockScheduler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more