Skip to main content

SnapshotCommit

Trait SnapshotCommit 

Source
pub trait SnapshotCommit: Send + Sync {
    // Required method
    fn commit<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        snapshot: &'life1 Snapshot,
        statistics: &'life2 [PartitionStatistics],
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Interface to commit a snapshot atomically.

Two implementations:

  • RenamingSnapshotCommit — file system atomic rename
  • RESTSnapshotCommit — via Catalog API (e.g. REST)

Required Methods§

Source

fn commit<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, snapshot: &'life1 Snapshot, statistics: &'life2 [PartitionStatistics], ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Commit the given snapshot. Returns true if successful, false if another writer won the race.

Implementors§