struct InFlight {
task: JoinHandle<Result<(u64, PathBuf)>>,
waiters: Vec<Sender<Result<(), Rejected>>>,
block_seqs: Vec<u64>,
open: Arc<Open>,
}Expand description
A block on its way to disk, and everyone owed an answer when it lands.
The flusher keeps at most one of these so the next block’s Arrow encode
overlaps the current one’s device time instead of queueing behind it — see
the settle call sites. One and not more: a second in flight would be a
second sealed block’s worth of resident bytes per shard against the
footprint axis, and the stall this removes is already gone at one.
Fields§
§task: JoinHandle<Result<(u64, PathBuf)>>§waiters: Vec<Sender<Result<(), Rejected>>>Acknowledged only when the rename lands. Holding them here rather than on the stack is the whole reason the loop may turn again meanwhile: the durability contract is unchanged, it is the waiting that moved.
block_seqs: Vec<u64>Retired against the log only on success, exactly as before. While this
is unlanded the sequences stay in Wal::pending, so the next block’s
watermark_for finds them and refuses to claim them — the overlap is
safe here by construction rather than by an added check.
open: Arc<Open>Also what the read path is served from until the rename lands, which is
why it is an Arc and not the bare Sealed the publish needs.
Auto Trait Implementations§
impl !RefUnwindSafe for InFlight
impl !UnwindSafe for InFlight
impl Freeze for InFlight
impl Send for InFlight
impl Sync for InFlight
impl Unpin for InFlight
impl UnsafeUnpin for InFlight
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].