pub struct SyncManager { /* private fields */ }Implementations§
Source§impl SyncManager
impl SyncManager
Sourcepub fn rebuild_progress(
&self,
_space_id: u64,
_tag_name: &str,
_field_name: &str,
) -> Option<RebuildProgress>
pub fn rebuild_progress( &self, _space_id: u64, _tag_name: &str, _field_name: &str, ) -> Option<RebuildProgress>
No rebuild engines are compiled in, so no progress can exist.
Sourcepub async fn recover_stale_rebuilds(&self) -> Result<usize, SyncError>
pub async fn recover_stale_rebuilds(&self) -> Result<usize, SyncError>
Fail non-terminal rebuild generations stranded by crashed attempts for every configured target, and collect fulltext rebuild scratch state. Idempotent; safe to run at startup before serving traffic. Missing targets count as zero instead of failing startup.
Sourcepub fn recover_stale_rebuilds_sync(&self) -> Result<usize, SyncError>
pub fn recover_stale_rebuilds_sync(&self) -> Result<usize, SyncError>
Sync wrapper around SyncManager::recover_stale_rebuilds for
startup paths without an async context.
pub fn get_dead_letter_entries(&self) -> Vec<DeadLetterEntry>
pub fn get_unrecovered_entries(&self) -> Vec<DeadLetterEntry>
pub fn get_old_dead_letter_entries(&self, age: Duration) -> Vec<DeadLetterEntry>
pub fn remove_dead_letter_entry(&self, index: usize) -> Option<DeadLetterEntry>
pub fn get_dlq_size(&self) -> usize
pub fn get_unrecovered_dlq_size(&self) -> usize
Source§impl SyncManager
impl SyncManager
pub fn retry_outbox_sync(&self) -> Result<usize, SyncError>
Source§impl SyncManager
impl SyncManager
pub fn on_vertex_change_with_txn( &self, txn_id: TransactionId, space_id: u64, tag_name: &str, vertex_id: &Value, properties: &[(Arc<str>, Value)], change_type: ChangeType, ) -> Result<(), SyncError>
pub fn on_index_create( &self, txn_id: TransactionId, request: IndexCreateRequest, ) -> Result<(), SyncError>
pub fn on_index_drop( &self, txn_id: TransactionId, space_id: u64, index_name: &str, schema_name: &str, index_type: &str, fields: &[String], ) -> Result<(), SyncError>
pub fn on_space_drop( &self, txn_id: TransactionId, space_id: u64, ) -> Result<(), SyncError>
pub fn on_tag_drop( &self, txn_id: TransactionId, space_id: u64, tag_name: &str, ) -> Result<(), SyncError>
pub fn on_edge_insert( &self, txn_id: TransactionId, space_id: u64, edge: &Edge, ) -> Result<(), SyncError>
pub fn on_edge_delete( &self, txn_id: TransactionId, space_id: u64, src: &Value, dst: &Value, edge_type: &str, ranking: i64, ) -> Result<(), SyncError>
pub fn on_edge_update( &self, _txn_id: TransactionId, _space_id: u64, _edge: EdgeRef<'_>, _props: EdgeProps<'_>, ) -> Result<(), SyncError>
Source§impl SyncManager
impl SyncManager
pub fn clear_transaction_intents(&self, txn_id: TransactionId)
pub fn attach_transaction_context( &self, txn_id: TransactionId, ) -> TransactionContextInfo
pub fn rollback_transaction_to_sequence_sync( &self, txn_id: TransactionId, sequence: u64, ) -> Result<(), SyncError>
pub async fn rollback_transaction( &self, txn_id: TransactionId, ) -> Result<(), SyncError>
pub fn rollback_transaction_sync( &self, txn_id: TransactionId, ) -> Result<(), SyncError>
pub fn pending_transaction_intents( &self, txn_id: TransactionId, ) -> Result<Vec<OutboxIntent>, SyncError>
Sourcepub fn pending_transaction_intent_sequence(&self, txn_id: TransactionId) -> u64
pub fn pending_transaction_intent_sequence(&self, txn_id: TransactionId) -> u64
Return the last staged intent sequence for a transaction.
Savepoints retain intents whose sequence is less than or equal to the saved boundary, so an empty transaction maps to boundary zero.
pub fn materialize_committed_transaction( &self, txn_id: TransactionId, commit_lsn: CommitLsn, intents: &[OutboxIntent], ) -> Result<(), SyncError>
Source§impl SyncManager
impl SyncManager
pub fn new_without_fulltext() -> Self
pub fn with_dead_letter_queue( self, dead_letter_queue: Arc<DeadLetterQueue>, ) -> Self
pub fn with_stats_manager(self, stats_manager: Arc<StatsManager>) -> Self
pub fn set_stats_manager(&mut self, stats_manager: Arc<StatsManager>)
pub async fn start(&self) -> Result<(), SyncError>
pub async fn stop(&self)
pub fn is_running(&self) -> bool
Source§impl SyncManager
impl SyncManager
pub fn configure_outbox( &mut self, path: impl AsRef<Path>, ) -> Result<(), SyncError>
pub fn configure_outbox_consumer(&mut self, config: OutboxConsumerConfig)
Sourcepub fn configure_backpressure(&mut self, config: OutboxBackpressureConfig)
pub fn configure_backpressure(&mut self, config: OutboxBackpressureConfig)
Override the backpressure limits (defaults: 10k per txn, 100k total).
Sourcepub fn staged_pending_len(&self) -> usize
pub fn staged_pending_len(&self) -> usize
Current in-memory staged intent count across all transactions.
Sourcepub fn outbox_pending(&self) -> usize
pub fn outbox_pending(&self) -> usize
Expose the current durable + staged pending depth for storage-layer
flow control. Returns 0 when no outbox is configured.
pub fn outbox_stats(&self) -> OutboxStats
Sourcepub fn sync_diagnostics(&self) -> Result<SyncDiagnostics, SyncError>
pub fn sync_diagnostics(&self) -> Result<SyncDiagnostics, SyncError>
Return durable outbox delivery and index-generation diagnostics.
Sourcepub fn create_outbox_snapshot(
&self,
destination: impl AsRef<Path>,
) -> Result<OutboxSnapshot, SyncError>
pub fn create_outbox_snapshot( &self, destination: impl AsRef<Path>, ) -> Result<OutboxSnapshot, SyncError>
Create a crash-safe immutable snapshot of the SQLite projection.
pub fn wait_for_minimum_lsn( &self, target: &TargetId, index_id: u64, generation: u64, minimum_lsn: CommitLsn, timeout_ms: u64, ) -> Result<bool, SyncError>
pub fn create_checkpoint_outbox_snapshot( &self, ) -> Result<OutboxSnapshot, SyncError>
pub fn verify_outbox_snapshot( snapshot: &OutboxSnapshot, ) -> Result<(), SyncError>
pub fn requeue_dead_letter(&self, event_id: i64) -> Result<bool, SyncError>
pub fn requeue_dead_letters_batch( &self, target: Option<&TargetId>, index_id: Option<u64>, generation: Option<u64>, limit: usize, ) -> Result<usize, SyncError>
pub fn list_dead_letters( &self, target: Option<&TargetId>, index_id: Option<u64>, generation: Option<u64>, limit: usize, offset: usize, ) -> Result<Vec<DeadLetterRow>, SyncError>
pub fn list_degraded_ranges( &self, target: Option<&TargetId>, index_id: Option<u64>, generation: Option<u64>, ) -> Result<Vec<DegradedRangeRow>, SyncError>
pub fn clear_degraded_range( &self, target: &TargetId, index_id: u64, generation: u64, start_lsn: CommitLsn, end_lsn: CommitLsn, ) -> Result<bool, SyncError>
pub fn retention_lsn(&self) -> Result<CommitLsn, SyncError>
pub fn update_retention_lsn( &self, retention_lsn: CommitLsn, ) -> Result<(), SyncError>
pub fn prune_applied_events( &self, retention_lsn: CommitLsn, ) -> Result<u64, SyncError>
pub fn archive_dead_letters( &self, retention_lsn: CommitLsn, ) -> Result<u64, SyncError>
pub fn prune_degraded_ranges(&self, max_age_ms: u64) -> Result<u64, SyncError>
Trait Implementations§
Source§impl Clone for SyncManager
impl Clone for SyncManager
Auto Trait Implementations§
impl !Freeze for SyncManager
impl !RefUnwindSafe for SyncManager
impl !UnwindSafe for SyncManager
impl Send for SyncManager
impl Sync for SyncManager
impl Unpin for SyncManager
impl UnsafeUnpin for SyncManager
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.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 moreSource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.