pub enum ApplyError {
ChannelMismatch {
got: ChannelId,
expected: ChannelId,
},
NonMonotonic {
index: usize,
},
FirstSeqMismatch {
declared: u64,
observed: u64,
},
StaleChunk {
first_seq: u64,
local_next: u64,
},
GapBeforeChunk {
first_seq: u64,
local_next: u64,
divergence_suspected: bool,
},
AppendFailed(String),
}Expand description
Errors surfaced by apply_sync_response.
Variants§
ChannelMismatch
channel_id in the response didn’t match the local
channel the applicator is bound to. Configuration drift —
a misrouted chunk arrived at a coordinator for a different
channel.
Fields
NonMonotonic
Events within the chunk are not strictly monotonic on
event_seq (gaps or out-of-order). Plan §2: “no gaps
within a chunk.”
FirstSeqMismatch
First event’s event_seq doesn’t match the response’s
declared first_seq. Pin so a corrupted wire payload
doesn’t slip through.
StaleChunk
Chunk’s first_seq lies in the past of the local tail.
Per plan §5: replicas drive recovery — apply only events
that strictly extend the local log.
Fields
GapBeforeChunk
Chunk’s first_seq is strictly greater than local_next
— there’s a gap the catchup didn’t fill. Replica skips
ahead per the §8 rejoin path when the gap exceeds
skip_threshold; otherwise the caller re-issues a
SYNC_REQUEST for the missing range.
divergence_suspected (R-5): the local tail had data in
[leader_first_retained_seq, first_seq). The replica’s
log diverges from the leader’s; safety still routes
through skip-ahead but operators should review.
Fields
AppendFailed(String)
Underlying append_batch errored. Wrapped string because
RedexError isn’t Eq.
Trait Implementations§
Source§impl Debug for ApplyError
impl Debug for ApplyError
Source§impl Display for ApplyError
impl Display for ApplyError
impl Eq for ApplyError
Source§impl Error for ApplyError
impl Error for ApplyError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for ApplyError
impl PartialEq for ApplyError
Source§fn eq(&self, other: &ApplyError) -> bool
fn eq(&self, other: &ApplyError) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ApplyError
Auto Trait Implementations§
impl Freeze for ApplyError
impl RefUnwindSafe for ApplyError
impl Send for ApplyError
impl Sync for ApplyError
impl Unpin for ApplyError
impl UnsafeUnpin for ApplyError
impl UnwindSafe for ApplyError
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.