struct Shard {
cur: Arc<Mutex<Option<Arc<Open>>>>,
ask: Sender<Sender<Option<Arc<Open>>>>,
}Expand description
Where the read path asks one flusher shard for a readable copy of its open block (section 4), and where the last copy it produced is cached.
The snapshot is taken on demand, never on a timer: an idle node with nobody
querying it copies nothing. A Mutex around the cached Arc rather than an
ArcSwap — the critical section is one pointer clone and a crate for that
would be a crate for nothing.
Fields§
§cur: Arc<Mutex<Option<Arc<Open>>>>§ask: Sender<Sender<Option<Arc<Open>>>>Handing the flusher somewhere to put an answer. Not generic in the signal’s request type, which is the whole reason the read path can hold three of these in one array.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Shard
impl RefUnwindSafe for Shard
impl Send for Shard
impl Sync for Shard
impl Unpin for Shard
impl UnsafeUnpin for Shard
impl UnwindSafe for Shard
Blanket Implementations§
impl<T> Allocation for T
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
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>,
Applies the layer to a service and wraps it in [
Layered].