Struct mz_persist_client::fetch::LeasedBatchPart
source · pub struct LeasedBatchPart<T> { /* private fields */ }
Expand description
A token representing one fetch-able batch part.
It is tradeable via crate::fetch::fetch_batch
for the resulting data
stored in the part.
§Exchange
You can exchange LeasedBatchPart
:
- If
leased_seqno.is_none()
- By converting it to
SerdeLeasedBatchPart
throughSelf::into_exchangeable_part
.SerdeLeasedBatchPart
is exchangeable, including over the network.
n.b. Self::into_exchangeable_part
is known to be equivalent to
SerdeLeasedBatchPart::from(self)
, but we want the additional warning message to
be visible and sufficiently scary.
§Panics
LeasedBatchPart
panics when dropped unless a very strict set of invariants are
held:
LeasedBatchPart
may only be dropped if it:
- Does not have a leased
SeqNo (i.e.
self.leased_seqno.is_none()`)
In any other circumstance, dropping LeasedBatchPart
panics.
Implementations§
source§impl<T> LeasedBatchPart<T>
impl<T> LeasedBatchPart<T>
sourcepub fn into_exchangeable_part(self) -> SerdeLeasedBatchPart
pub fn into_exchangeable_part(self) -> SerdeLeasedBatchPart
Takes self
into a SerdeLeasedBatchPart
, which allows self
to be
exchanged (potentially across the network).
!!!WARNING!!!
This semantically transfers the lease to the returned
SerdeLeasedBatchPart. If self
has a leased_seqno
, failing to take
the returned SerdeLeasedBatchPart
back into a LeasedBatchPart
will
leak SeqNo
s and prevent persist GC.
sourcepub fn encoded_size_bytes(&self) -> usize
pub fn encoded_size_bytes(&self) -> usize
The encoded size of this part in bytes
sourcepub fn request_filter_pushdown_audit(&mut self)
pub fn request_filter_pushdown_audit(&mut self)
The filter has indicated we don’t need this part, we can verify the ongoing end-to-end correctness of corner cases via “audit”. This means we fetch the part like normal and if the MFP keeps anything from it, then something has gone horribly wrong.
Trait Implementations§
source§impl<T: Debug> Debug for LeasedBatchPart<T>
impl<T: Debug> Debug for LeasedBatchPart<T>
source§impl<T> Drop for LeasedBatchPart<T>
impl<T> Drop for LeasedBatchPart<T>
source§fn drop(&mut self)
fn drop(&mut self)
For details, see LeasedBatchPart
.
source§impl<T: Timestamp + Codec64> RustType<(ProtoLeasedBatchPart, Arc<Metrics>)> for LeasedBatchPart<T>
impl<T: Timestamp + Codec64> RustType<(ProtoLeasedBatchPart, Arc<Metrics>)> for LeasedBatchPart<T>
source§fn into_proto(&self) -> (ProtoLeasedBatchPart, Arc<Metrics>)
fn into_proto(&self) -> (ProtoLeasedBatchPart, Arc<Metrics>)
Self
into a Proto
value.source§fn from_proto(
proto: (ProtoLeasedBatchPart, Arc<Metrics>)
) -> Result<Self, TryFromProtoError>
fn from_proto( proto: (ProtoLeasedBatchPart, Arc<Metrics>) ) -> Result<Self, TryFromProtoError>
Auto Trait Implementations§
impl<T> !Freeze for LeasedBatchPart<T>
impl<T> !RefUnwindSafe for LeasedBatchPart<T>
impl<T> Send for LeasedBatchPart<T>where
T: Send,
impl<T> Sync for LeasedBatchPart<T>where
T: Sync,
impl<T> Unpin for LeasedBatchPart<T>where
T: Unpin,
impl<T> !UnwindSafe for LeasedBatchPart<T>
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<R, O, T> CopyOnto<ConsecutiveOffsetPairs<R, O>> for T
impl<R, O, T> CopyOnto<ConsecutiveOffsetPairs<R, O>> for T
source§fn copy_onto(
self,
target: &mut ConsecutiveOffsetPairs<R, O>
) -> <ConsecutiveOffsetPairs<R, O> as Region>::Index
fn copy_onto( self, target: &mut ConsecutiveOffsetPairs<R, O> ) -> <ConsecutiveOffsetPairs<R, O> as Region>::Index
source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> 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
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
source§fn into_rust(self) -> Result<R, TryFromProtoError>
fn into_rust(self) -> Result<R, TryFromProtoError>
RustType::from_proto
.source§fn from_rust(rust: &R) -> P
fn from_rust(rust: &R) -> P
RustType::into_proto
.