Skip to main content

QueryHandle

Struct QueryHandle 

Source
pub struct QueryHandle { /* private fields */ }
Expand description

RAII admission handle for one native query.

Implementations§

Source§

impl QueryHandle

Source

pub fn admission_request_id(&self) -> AdmissionRequestId

Stable service-local request id assigned for this admission attempt.

Source

pub fn admission_sequence(&self) -> u64

Monotonic service-local admission sequence assigned when this handle was admitted.

Source

pub fn admission_wait(&self) -> Duration

Time spent waiting in the service admission queue.

Source

pub fn admission_wait_fact(&self) -> Option<AttemptAdmissionWaitFact>

Returns the final controller-owned queue state for this queued admission, when the handle was admitted through the bounded queue. Direct non-queued admission intentionally has no such fact.

Source

pub fn device_budget_bytes(&self) -> u64

Device-memory budget slice assigned to this query.

Source

pub fn device_ordinal(&self) -> usize

CUDA device ordinal selected for this query.

Source

pub fn join_fragment(&self, fragment: &AttemptCapabilityEvidence) -> Result<()>

Joins a fragment planned after this attempt’s claim to its grant.

The fragment runs under the same grant when the granted device provides every capability it requires; its plan identity is then added to what the attempt may execute. The queue and the ledger do not change. A device that lacks a capability, or a released handle, returns a typed error.

Source

pub fn grant_identity(&self) -> Result<GrantIdentity>

Immutable attempt and ledger generation committed for this admission.

Source

pub fn memory_control_policy(&self) -> MemoryControlPolicy

Bounded memory policy this handle will use for native execution.

Source

pub fn source_scheduler_policy(&self) -> SourceSchedulerPolicy

Source scheduler policy copied into the admitted execution context.

Source

pub fn source_chunk_planning_mode(&self) -> SourceChunkPlanningMode

Source chunk planning mode copied into the admitted execution context.

Source

pub fn statistical_aggregate_execution_mode( &self, ) -> StatisticalAggregateExecutionMode

Floating statistical aggregate execution contract assigned to this admitted query.

Source

pub fn aggregate_strategy_execution_options( &self, ) -> AggregateStrategyExecutionOptions

Grouped aggregate strategy execution policy assigned to this admitted query.

Source

pub fn source_chunk_planning_options(&self) -> SourceChunkPlanningOptions

Expert source chunk planning policy assigned to this admitted query.

Source

pub fn acquire_context(&self) -> Result<AdmittedQueryContext>

Acquires an admitted execution context from the service stream pool.

Source

pub async fn acquire_context_with_cancellation_async( self: &Arc<Self>, cancellation: ExecutionCancellation, ) -> Result<AdmittedQueryContext>

Acquires an admitted execution context on this query’s device executor.

Source

pub fn gpu_executor(&self) -> Result<GpuExecutorLease>

Opaque lifecycle-bound executor for synchronous GPU work on this query’s selected device.

Source

pub fn acquire_context_with_cancellation( &self, cancellation: ExecutionCancellation, ) -> Result<AdmittedQueryContext>

Acquires an admitted execution context that observes caller-supplied cooperative cancellation.

Trait Implementations§

Source§

impl Debug for QueryHandle

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more