Skip to main content

PostgresChunkStateProvider

Trait PostgresChunkStateProvider 

Source
pub trait PostgresChunkStateProvider: Send + Sync {
    // Required method
    fn state_for_commit(
        &self,
        committed_counts: ExecutionCounts,
        chunk_counts: ChunkCounts,
    ) -> Result<ChunkCommitReceipt, PostgresChunkStateError>;
}
Expand description

Produces checkpoint and context state at a PostgreSQL chunk commit boundary.

The provider receives the last committed durable counters and the checked counts for the open chunk. It may also observe application-owned reader state through synchronized values captured by the implementation.

Required Methods§

Source

fn state_for_commit( &self, committed_counts: ExecutionCounts, chunk_counts: ChunkCounts, ) -> Result<ChunkCommitReceipt, PostgresChunkStateError>

Produces the durable state to commit with chunk_counts.

§Errors

Returns a value-redacted preparation failure. Panics are caught by the adapter and the open transaction is left eligible only for rollback.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§