Skip to main content

Module committer

Module committer 

Source
Expand description

The committer module provides a Committer trait which allows different implementations to define how to commit transactions to a catalog or filesystem. For catalog-managed tables, a Committer specific to the managing catalog should be provided. For non-catalog-managed tables, the FileSystemCommitter should be used to commit directly to the object store (via put-if-absent call to storage to atomically write new commit files).

By implementing the Committer trait, different catalogs can define what happens when the kernel needs to commit a transaction to a table. The goal terminal state of every Transaction is to be committed to the table. This means writing the changes (we call these actions) in the transaction as a new version of the table. The Committer trait exposes a single method, commit which takes an engine, an iterator of actions (as EngineData batches), and CommitMetadata (which includes critical commit metadata like the version to commit) to allow different catalogs to define what it means to ‘commit’ the actions to a table. For some, this may mean writing staged commits to object storage and retaining an in-memory list (server side) of commits. For others, this may mean writing new (version, actions) tuples to a database.

The implementation of commit must ensure that the actions are committed atomically to the table at the given version and either (1) persisted directly to object storage as published deltas as in non-catalog-managed tables or (2) persisted within the catalog and made available to readers during snapshot contstruction via the log_tail API.

Structs§

CatalogCommit
A catalog commit that has been ratified by the catalog but not yet published to the Delta log.
CommitMetadata
CommitMetadata bundles the metadata about a commit operation. This includes the commit path, version, and protocol/metadata state of the table being committed to. Catalog committers can use the protocol and metadata getters to validate or inspect the commit.
CommitProtocolMetadata
The protocol and metadata state for this commit. Groups the read snapshot state (if any) and the new state being committed (if any).
FileSystemCommitter
The FileSystemCommitter is an internal implementation of the Committer trait which commits to a file system directly via Engine::json_handler().write_json_file for non-catalog-managed tables.
PublishMetadata
Metadata required for publishing catalog commits to the Delta log.

Enums§

CommitResponse
CommitResponse is the result of committing a transaction via a catalog. The committer uses this type to indicate whether or not the commit was successful or conflicted. The kernel then transforms the associated Transaction into the appropriate state.
CommitType
The type of commit operation being performed. This communicates to the committer whether this is a table creation or a write to an existing table, and whether the table is catalog-managed.

Traits§

Committer
A Committer is the system by which transactions are committed to a table. Transactions are effectively a collection of actions performed on the table at a specific version. The kernel exposes this trait so different catalogs can build their own commit implementations. For example, different catalogs may: commit directly to a database, commit to an object store, or use another system entirely.