pub struct ListFieldScheduler { /* private fields */ }
Expand description
A page scheduler for list fields that encodes offsets in one field and items in another
The list scheduler is somewhat unique because it requires indirect I/O. We cannot know the
ranges we need simply by looking at the metadata. This means that list scheduling doesn’t
fit neatly into the two-thread schedule-loop / decode-loop model. To handle this, when a
list page is scheduled, we only schedule the I/O for the offsets and then we immediately
launch a new tokio task. This new task waits for the offsets, decodes them, and then
schedules the I/O for the items. Keep in mind that list items can be lists themselves. If
that is the case then this indirection will continue. The decode task that is returned will
only finish wait
ing when all of the I/O has completed.
Whenever we schedule follow-up I/O like this the priority is based on the top-level row index. This helps ensure that earlier rows get finished completely (including follow up tasks) before we perform I/O for later rows.
Implementations§
Source§impl ListFieldScheduler
impl ListFieldScheduler
pub fn new( offsets_scheduler: Arc<dyn FieldScheduler>, items_scheduler: Arc<dyn FieldScheduler>, items_field: Arc<Field>, offset_type: DataType, offset_page_info: Vec<OffsetPageInfo>, ) -> Self
Trait Implementations§
Source§impl Debug for ListFieldScheduler
impl Debug for ListFieldScheduler
Source§impl FieldScheduler for ListFieldScheduler
impl FieldScheduler for ListFieldScheduler
Source§fn schedule_ranges<'a>(
&'a self,
ranges: &[Range<u64>],
filter: &FilterExpression,
) -> Result<Box<dyn SchedulingJob + 'a>>
fn schedule_ranges<'a>( &'a self, ranges: &[Range<u64>], filter: &FilterExpression, ) -> Result<Box<dyn SchedulingJob + 'a>>
Source§fn initialize<'a>(
&'a self,
_filter: &'a FilterExpression,
_context: &'a SchedulerContext,
) -> BoxFuture<'a, Result<()>>
fn initialize<'a>( &'a self, _filter: &'a FilterExpression, _context: &'a SchedulerContext, ) -> BoxFuture<'a, Result<()>>
Auto Trait Implementations§
impl Freeze for ListFieldScheduler
impl !RefUnwindSafe for ListFieldScheduler
impl Send for ListFieldScheduler
impl Sync for ListFieldScheduler
impl Unpin for ListFieldScheduler
impl !UnwindSafe for ListFieldScheduler
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