pub enum FillClaim {
Attach {
session: Arc<FillSession>,
lease: ObserverLease,
},
Owner {
session: Arc<FillSession>,
lease: ObserverLease,
},
Mixed {
owner: Arc<FillSession>,
owner_lease: ObserverLease,
attach: Arc<FillSession>,
attach_lease: ObserverLease,
remainder_offset: u64,
remainder_len: u64,
},
}Expand description
The atomic outcome of FillRegistry::claim: a serve-miss either coalesces
wholly onto live pulls (Attach), owns a fresh pull for its whole range
(Owner), or — on a partial overlap — owns a fresh pull for its non-overlapping
REMAINDER while attaching to a live sibling for the overlap (Mixed). Every
variant carries the FillSessions and ObserverLeases the caller holds
for the life of its serve leg. claim decides the split AND registers any new
owner session under ONE map-lock acquisition, so two concurrent fresh misses for
the same blob cannot both open a pull.
Variants§
Attach
A live pull already covers the whole request; run a serve leg over session
and open NO new pull. lease is an observer lease on the existing fill.
Fields
session: Arc<FillSession>The live session to serve from (largest overlap with the request).
lease: ObserverLeaseThe observer lease held for the life of the attaching serve leg.
Owner
No live pull covers the request; the caller owns the freshly-registered
session (scoped to the WHOLE request) and must spawn the pull. lease is
the owner lease (observer count starts at 1).
Fields
session: Arc<FillSession>The freshly-registered session the caller must drive a pull for.
lease: ObserverLeaseThe owner lease (count 1) held for the life of the owning pull.
Mixed
A partial overlap: a live sibling covers a prefix/suffix of the request. The
caller OWNS a fresh pull for the contiguous remainder ([remainder_offset, remainder_offset + remainder_len)) and ATTACHES to the sibling for the
overlap, serving the whole request from the shared per-hash cache + outboard.
Two pulls, each fetching its bytes once.
Fields
owner: Arc<FillSession>The freshly-registered session covering the remainder; drive its pull.
owner_lease: ObserverLeaseThe owner lease (count 1) for the remainder pull.
attach: Arc<FillSession>The live sibling covering the overlap; its pull is shared, not re-opened.
attach_lease: ObserverLeaseThe observer lease on the sibling, held for the life of the serve leg.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FillClaim
impl RefUnwindSafe for FillClaim
impl Send for FillClaim
impl Sync for FillClaim
impl Unpin for FillClaim
impl UnsafeUnpin for FillClaim
impl UnwindSafe for FillClaim
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