Skip to main content

MigrationExecutionProvider

Trait MigrationExecutionProvider 

Source
pub trait MigrationExecutionProvider: Send + Sync {
    // Required methods
    fn available_capabilities(&self) -> &CapabilitySet;
    fn observe_managed_state<'a>(
        &'a self,
        lease: &'a MigrationLease,
        source_candidate: &'a ManagedSchemaState,
        target_candidate: &'a ManagedSchemaState,
    ) -> ExecutionFuture<'a, ManagedSchemaState>;
    fn prepare_group<'a>(
        &'a self,
        lease: &'a MigrationLease,
        source: &'a ManagedSchemaState,
        target: &'a ManagedSchemaState,
    ) -> ExecutionFuture<'a, Box<dyn PreparedMigrationGroup + 'a>>;

    // Provided methods
    fn supports_backfill_execution(&self) -> bool { ... }
    fn observe_backfill<'a>(
        &'a self,
        lease: &'a MigrationLease,
        plan: &'a AttributeBackfillPlan,
        direction: BackfillExecutionDirection,
    ) -> ExecutionFuture<'a, BackfillRecoveryObservation> { ... }
    fn execute_backfill<'a>(
        &'a self,
        lease: &'a MigrationLease,
        plan: &'a AttributeBackfillPlan,
        direction: BackfillExecutionDirection,
        control: &'a MigrationExecutionControl,
    ) -> BackfillExecutionFuture<'a> { ... }
}
Expand description

Provider seam for exact managed-state observation and group transactions.

Required Methods§

Source

fn available_capabilities(&self) -> &CapabilitySet

Return the exact capabilities negotiated by this execution provider.

Source

fn observe_managed_state<'a>( &'a self, lease: &'a MigrationLease, source_candidate: &'a ManagedSchemaState, target_candidate: &'a ManagedSchemaState, ) -> ExecutionFuture<'a, ManagedSchemaState>

Independently observe managed state under the current active fence.

The source and target candidates supply the already-verified scope, profiles, and possible managed selections used for observation. Their fingerprint claims are not observation input.

Source

fn prepare_group<'a>( &'a self, lease: &'a MigrationLease, source: &'a ManagedSchemaState, target: &'a ManagedSchemaState, ) -> ExecutionFuture<'a, Box<dyn PreparedMigrationGroup + 'a>>

Begin a transaction that rechecks exact source state and the active fence.

Provided Methods§

Source

fn supports_backfill_execution(&self) -> bool

Return whether the provider implements the closed backfill transaction seam.

Source

fn observe_backfill<'a>( &'a self, lease: &'a MigrationLease, plan: &'a AttributeBackfillPlan, direction: BackfillExecutionDirection, ) -> ExecutionFuture<'a, BackfillRecoveryObservation>

Observe the exact postcondition for one closed backfill program.

Source

fn execute_backfill<'a>( &'a self, lease: &'a MigrationLease, plan: &'a AttributeBackfillPlan, direction: BackfillExecutionDirection, control: &'a MigrationExecutionControl, ) -> BackfillExecutionFuture<'a>

Execute deterministic internal transaction groups under the active fence.

Every provider commit must atomically recheck the supplied lease. The returned evidence is terminal only after the exact postcondition has been re-observed; partial progress is represented by commit certainty, never by a successful prefix.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§