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§
- Catalog
Commit - A catalog commit that has been ratified by the catalog but not yet published to the Delta log.
- Commit
Metadata CommitMetadatabundles 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.- Commit
Protocol Metadata - The protocol and metadata state for this commit. Groups the read snapshot state (if any) and the new state being committed (if any).
- File
System Committer - The
FileSystemCommitteris an internal implementation of theCommittertrait which commits to a file system directly viaEngine::json_handler().write_json_filefor non-catalog-managed tables. - Publish
Metadata - Metadata required for publishing catalog commits to the Delta log.
Enums§
- Commit
Response CommitResponseis 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 associatedTransactioninto the appropriate state.- Commit
Type - 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.