Skip to main content

MetadataIoActor

Struct MetadataIoActor 

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

A cloneable handle to the bounded metadata I/O owner.

Implementations§

Source§

impl MetadataIoActor

Source

pub fn submit( &self, request: MetadataWriteRequest, deadline: MetadataDeadline, ) -> RuntimeResult<MetadataIoAdmissionOutcome>

Attempts to admit one immutable snapshot without waiting for disk durability.

The call is deliberately non-blocking. Queue or byte saturation is returned immediately and the absolute deadline is checked before admission.

Returns a normal MetadataIoAdmissionOutcome::TargetConflict when the same resource already has pending work for a different target.

§Errors

Returns a typed deadline, capacity, or lifecycle failure.

Source

pub fn submit_next( &self, resource: impl Into<Arc<str>>, target: impl Into<PathBuf>, bytes: impl Into<Vec<u8>>, deadline: MetadataDeadline, ) -> RuntimeResult<MetadataIoAdmissionOutcome>

Assigns the next owner-lifetime generation and accepts an immutable snapshot without waiting for durability.

Generation values are unique across every metadata actor that shares this runtime owner, so a generation stays a usable change identity after an actor is replaced. Gaps are allowed when admission rejects a request; they do not weaken ordering.

§Errors

Returns the same normal outcome and typed failures as Self::submit.

Source

pub async fn submit_durable( &self, request: MetadataWriteRequest, deadline: MetadataDeadline, ) -> RuntimeResult<MetadataIoDurabilityOutcome>

Accepts a snapshot and waits for durable completion using the same absolute deadline.

Returns MetadataIoDurabilityOutcome::TargetConflict without starting I/O when a pending request owns a different target path.

§Errors

Returns a typed admission, persistence, worker, or deadline failure.

Source

pub async fn submit_commit( &self, request: MetadataWriteRequest, deadline: MetadataDeadline, ) -> RuntimeResult<MetadataIoCommitAdmissionOutcome>

Accepts a snapshot and returns its real persistence conclusion.

This distinguishes a failure before target replacement from an unconfirmed replacement followed by a parent-directory sync failure.

Source

pub async fn submit_next_durable( &self, resource: impl Into<Arc<str>>, target: impl Into<PathBuf>, bytes: impl Into<Vec<u8>>, deadline: MetadataDeadline, ) -> RuntimeResult<MetadataIoDurabilityOutcome>

Assigns the next process-lifetime generation, accepts the immutable snapshot, and waits for durable completion using one absolute deadline.

§Errors

Returns the same normal outcome and typed failures as Self::submit_durable.

Source

pub async fn submit_next_commit( &self, resource: impl Into<Arc<str>>, target: impl Into<PathBuf>, bytes: impl Into<Vec<u8>>, deadline: MetadataDeadline, ) -> RuntimeResult<MetadataIoCommitAdmissionOutcome>

Assigns the next owner-lifetime generation and returns its real persistence conclusion.

Source

pub async fn submit_observed( &self, request: MetadataWriteRequest, deadline: MetadataDeadline, ) -> RuntimeResult<MetadataIoCommitObservation>

Accepts a snapshot and reports what the caller actually confirmed about its persistence.

An Err result means the request was never admitted, so the caller may safely discard its change. Every other case is expressed as a MetadataIoCommitObservation, including an expiry that leaves the change unconfirmed.

§Errors

Returns a typed admission, capacity, or lifecycle failure.

Source

pub async fn submit_next_observed( &self, resource: impl Into<Arc<str>>, target: impl Into<PathBuf>, bytes: impl Into<Vec<u8>>, deadline: MetadataDeadline, ) -> RuntimeResult<MetadataIoCommitObservation>

Assigns the next owner-lifetime generation and reports what the caller actually confirmed about its persistence.

§Errors

Returns the same normal outcome and typed failures as Self::submit_observed.

Source

pub fn confirmed_durable_generation( &self, resource: &str, ) -> Option<MetadataGeneration>

Returns the highest generation this actor confirmed durable for one logical resource.

This is the evidence a caller needs to resolve an earlier MetadataIoCommitObservation::Unobserved conclusion without holding completion history: when the value reaches the unobserved generation, the change is durable after all. The value is seeded from the owner-scoped target registration, so it survives actor replacement for the same resource and target. After explicit retirement, compare Self::target_identity with the receipt’s identity first: generations from a different history are not evidence about the old write.

Source

pub async fn shutdown_until( &self, deadline: MetadataDeadline, ) -> MetadataIoShutdownReport

Stops new admission and drains accepted work until the absolute deadline.

Source

pub fn stop_admission(&self)

Rejects future submissions while allowing accepted work to drain.

Source

pub fn snapshot(&self) -> MetadataIoSnapshot

Returns current queue, byte, generation, and waiter state.

Source

pub fn observer(&self) -> MetadataIoObserver

Creates a diagnostic observer without retaining write authority.

Source

pub fn target_identity(&self, resource: &str) -> Option<MetadataTargetIdentity>

Returns the target history associated with this actor’s resource state.

Source

pub fn retire_target_for_new_identity( &self, resource: &str, ) -> RuntimeResult<MetadataTargetRetirementOutcome>

Ends a closed, drained resource’s durable history to reclaim registry capacity.

This is an explicit identity boundary, not ordinary actor replacement. Future actors acquire a new identity and may bind a different resource to the path. Old actors cannot resume that history; retained read-only receipts keep their original result and identity. Compare generations only within the same identity.

Unconfirmed replacements retain their fence. The runtime cannot verify business file formats and does not offer unconditional fence clearing.

§Errors

Returns a typed path normalization error without modifying the history.

Source

pub fn effective_profile(&self) -> MetadataIoEffectiveProfile

Returns the metadata I/O limits that are actually in force.

The view is read-only and derived from the validated configuration and the root blocking lane policy captured at startup, so it reports the values that drive execution rather than the values a caller requested.

Trait Implementations§

Source§

impl Clone for MetadataIoActor

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MetadataIoActor

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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