pub struct DistributedReadRegistry { /* private fields */ }Expand description
Server-owned coordinator registry. It is deliberately independent of the HTTP connection: timeout, disconnect, and explicit cancel all use the same idempotent transition and invoke peer cleanup outside its entry lock.
Implementations§
Source§impl DistributedReadRegistry
impl DistributedReadRegistry
pub fn new() -> Self
Sourcepub fn register_with_id(
&self,
execution_id: ReadExecutionId,
owner: ReadExecutionOwner,
plan: ReadExecutionPlanSummary,
peer_cancellations: Vec<PeerCancellation>,
) -> Result<()>
pub fn register_with_id( &self, execution_id: ReadExecutionId, owner: ReadExecutionOwner, plan: ReadExecutionPlanSummary, peer_cancellations: Vec<PeerCancellation>, ) -> Result<()>
Register before dispatching any worker request. Supplying the planner’s
request_id makes that one ID the coordinator/worker/HTTP correlation
key required by the distributed-read protocol.
Sourcepub fn register(
&self,
owner: ReadExecutionOwner,
plan: ReadExecutionPlanSummary,
peer_cancellations: Vec<PeerCancellation>,
) -> Result<ReadExecutionId>
pub fn register( &self, owner: ReadExecutionOwner, plan: ReadExecutionPlanSummary, peer_cancellations: Vec<PeerCancellation>, ) -> Result<ReadExecutionId>
Allocate a fresh request ID for a coordinator that does not already have one from route planning.
Sourcepub fn publish_prepared(
&self,
execution_id: &ReadExecutionId,
prepared: PreparedResult,
) -> Result<ReadExecutionSummary>
pub fn publish_prepared( &self, execution_id: &ReadExecutionId, prepared: PreparedResult, ) -> Result<ReadExecutionSummary>
Publish only P2.11’s immutable prepared result. This is the sole transition that permits the HTTP adapter to open a row stream.
Sourcepub fn fail(
&self,
execution_id: &ReadExecutionId,
failure: ReadExecutionFailure,
) -> Result<ReadExecutionSummary>
pub fn fail( &self, execution_id: &ReadExecutionId, failure: ReadExecutionFailure, ) -> Result<ReadExecutionSummary>
Record a classified coordinator failure and cancel every registered peer exactly once. No prepared rows survive this transition.
pub fn cancel( &self, execution_id: &ReadExecutionId, requester_profile: Option<&str>, ) -> Result<ReadCancellation>
pub fn summary( &self, execution_id: &ReadExecutionId, requester_profile: Option<&str>, ) -> Result<ReadExecutionSummary>
Sourcepub fn open_prepared(
&self,
execution_id: &ReadExecutionId,
requester_profile: Option<&str>,
) -> Result<PreparedReadLease>
pub fn open_prepared( &self, execution_id: &ReadExecutionId, requester_profile: Option<&str>, ) -> Result<PreparedReadLease>
Obtain a read-only lease only after P2.11 preparation succeeded.
Sourcepub fn cleanup_terminal_before(&self, cutoff: SystemTime)
pub fn cleanup_terminal_before(&self, cutoff: SystemTime)
Remove only small, terminal tombstones and never a live preparation or a retained prepared result. The server calls this with session TTL.
pub fn cleanup_after(&self, ttl: Duration)
Trait Implementations§
Source§impl Clone for DistributedReadRegistry
impl Clone for DistributedReadRegistry
Source§fn clone(&self) -> DistributedReadRegistry
fn clone(&self) -> DistributedReadRegistry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for DistributedReadRegistry
impl Default for DistributedReadRegistry
Source§fn default() -> DistributedReadRegistry
fn default() -> DistributedReadRegistry
Auto Trait Implementations§
impl !RefUnwindSafe for DistributedReadRegistry
impl !UnwindSafe for DistributedReadRegistry
impl Freeze for DistributedReadRegistry
impl Send for DistributedReadRegistry
impl Sync for DistributedReadRegistry
impl Unpin for DistributedReadRegistry
impl UnsafeUnpin for DistributedReadRegistry
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request