lance_table::io

Module commit

Source
Expand description

Trait for commit implementations.

In Lance, a transaction is committed by writing the next manifest file. However, care should be taken to ensure that the manifest file is written only once, even if there are concurrent writers. Different stores have different abilities to handle concurrent writes, so a trait is provided to allow for different implementations.

The trait CommitHandler can be implemented to provide different commit strategies. The default implementation for most object stores is RenameCommitHandler, which writes the manifest to a temporary path, then renames the temporary path to the final path if no object already exists at the final path. This is an atomic operation in most object stores, but not in AWS S3. So for AWS S3, the default commit handler is UnsafeCommitHandler, which writes the manifest to the final path without any checks.

When providing your own commit handler, most often you are implementing in terms of a lock. The trait CommitLock can be implemented as a simpler alternative to CommitHandler.

Modules§

Structs§

Enums§

Traits§

Functions§

Type Aliases§