#[non_exhaustive]pub enum WriteCoalescing {
ByKey,
KeepEveryWrite,
}Expand description
How a store queues writes that arrive while its ingest is busy.
For the same writes in a batch, both publish the same rows, change
highlights and their directions, fading removals, pinned rows and
progress, and the same ChangeSet, except that
ChangeSet::updated names a row once for writes merged into one entry
instead of once per write. They differ in what a stream costs: the
queue’s memory and the ingest’s work grow with the number of keys
written (Self::ByKey) or with the number of writes
(Self::KeepEveryWrite) between two batches. Neither pushes back on
producers: a stream of new keys, or an ingest that falls behind, still
grows the queue.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ByKey
An upsert of a key whose upsert still waits for the ingest takes that
one’s place in the queue, so a stream that outruns the ingest queues
one entry per key, not per write. The writer diffs the new row
against the waiting one (GridRow::changed_columns and
GridRow::change_direction), so the ingest highlights each change
as if it had applied every write. remove, mark_changed,
replace_all, clear and the end of a reload are barriers: an
upsert after one never merges into a write before it.
KeepEveryWrite
Every write waits in the queue in turn: under a stream faster than the ingest the queue grows with the event rate.
Trait Implementations§
Source§impl Clone for WriteCoalescing
impl Clone for WriteCoalescing
Source§fn clone(&self) -> WriteCoalescing
fn clone(&self) -> WriteCoalescing
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WriteCoalescing
impl Debug for WriteCoalescing
Source§impl Default for WriteCoalescing
impl Default for WriteCoalescing
Source§fn default() -> WriteCoalescing
fn default() -> WriteCoalescing
Source§impl PartialEq for WriteCoalescing
impl PartialEq for WriteCoalescing
impl Copy for WriteCoalescing
impl Eq for WriteCoalescing
impl StructuralPartialEq for WriteCoalescing
Auto Trait Implementations§
impl Freeze for WriteCoalescing
impl RefUnwindSafe for WriteCoalescing
impl Send for WriteCoalescing
impl Sync for WriteCoalescing
impl Unpin for WriteCoalescing
impl UnsafeUnpin for WriteCoalescing
impl UnwindSafe for WriteCoalescing
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§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> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().