|
| Kind | kind () const override |
| | Return the kind of this pending update.
|
| |
| bool | IsRetryable () const override |
| | Whether this update can be retried after a commit conflict.
|
| |
| Status | Commit () override |
| | Apply the pending changes and commit.
|
| |
| auto & | ReportWith (this auto &self, std::shared_ptr< MetricsReporter > reporter) |
| | Set the metrics reporter for this snapshot update.
|
| |
| auto & | DeleteWith (this auto &self, std::function< Status(const std::string &)> delete_func) |
| | Set a callback to delete files instead of the table's default.
|
| |
| auto & | StageOnly (this auto &self) |
| | Stage a snapshot in table metadata, but do not make it current.
|
| |
| auto & | ScanManifestsWith (this auto &self, Executor &executor) |
| | Configure an executor for manifest planning work.
|
| |
| auto & | ToBranch (this auto &self, const std::string &branch) |
| | Perform operations on a particular branch.
|
| |
| auto & | Set (this auto &self, const std::string &property, const std::string &value) |
| | Set a summary property in the snapshot produced by this update.
|
| |
| auto & | WriteManifestsWith (this auto &self, Executor &executor, int32_t parallelism) |
| | Configure an executor and max writer count for writing new manifests.
|
| |
|
| PendingUpdate (const PendingUpdate &)=delete |
| |
|
PendingUpdate & | operator= (const PendingUpdate &)=delete |
| |
|
| PendingUpdate (PendingUpdate &&)=delete |
| |
|
PendingUpdate & | operator= (PendingUpdate &&)=delete |
| |
|
| ErrorCollector (ErrorCollector &&)=default |
| |
|
ErrorCollector & | operator= (ErrorCollector &&)=default |
| |
|
| ErrorCollector (const ErrorCollector &)=default |
| |
|
ErrorCollector & | operator= (const ErrorCollector &)=default |
| |
| template<typename... Args> |
| auto & | AddError (this auto &self, ErrorKind kind, const std::format_string< Args... > fmt, Args &&... args) |
| | Add a specific error.
|
| |
| auto & | AddError (this auto &self, Error err) |
| | Add an existing error object.
|
| |
| auto & | AddError (this auto &self, ::iceberg::unexpected< Error > err) |
| | Add an unexpected result's error.
|
| |
|
auto & | AddError (this auto &self, std::unexpected< Error > err) |
| |
| bool | has_errors () const |
| | Check if any errors have been collected.
|
| |
| size_t | error_count () const |
| | Get the number of errors collected.
|
| |
| Status | CheckErrors () const |
| | Check for accumulated errors and return them if any exist.
|
| |
| void | ClearErrors () |
| | Clear all accumulated errors.
|
| |
|
const std::vector< Error > & | errors () const |
| | Get read-only access to all collected errors.
|
| |
|
| virtual Result< ApplyResult > | Apply () |
| | Build snapshot state for the transaction's current metadata.
|
| |
| Status | Finalize (const TableMetadata &committed) override |
| | Complete a known successful commit. Called only by Transaction with the final committed table metadata.
|
| |
| Status | CleanStaged () override |
| | Discard this generation's staging, retaining applied operation intent.
|
| |
|
| SnapshotUpdate (std::shared_ptr< TransactionContext > ctx) |
| |
| Result< std::vector< ManifestFile > > | WriteDataManifests (std::span< const std::shared_ptr< DataFile > > files, const std::shared_ptr< PartitionSpec > &spec, std::optional< int64_t > data_sequence_number=std::nullopt) |
| | Write data manifests for the given data files.
|
| |
|
Result< std::vector< ManifestFile > > | WriteDeleteManifests (std::span< const ContentFileWithSequenceNumber > files, const std::shared_ptr< PartitionSpec > &spec) |
| |
|
const std::string & | target_branch () const |
| |
|
bool | can_inherit_snapshot_id () const |
| |
|
const std::string & | commit_uuid () const |
| |
|
int32_t | manifest_count () const |
| |
|
int32_t | attempt () const |
| |
|
int64_t | target_manifest_size_bytes () const |
| |
| virtual Status | CleanUncommitted (const std::unordered_set< std::string > &committed)=0 |
| | Clean up any uncommitted manifests that were created.
|
| |
| virtual std::string | operation ()=0 |
| | A string that describes the action that produced the new snapshot.
|
| |
| virtual Status | Validate (const TableMetadata ¤t_metadata, const std::shared_ptr< Snapshot > &snapshot) |
| | Validate the current metadata.
|
| |
| virtual Result< std::vector< ManifestFile > > | Apply (const TableMetadata &metadata_to_update, const std::shared_ptr< Snapshot > &snapshot)=0 |
| | Apply the update's changes to the given metadata and snapshot.
|
| |
| virtual std::unordered_map< std::string, std::string > | Summary ()=0 |
| | Get the summary map for this operation.
|
| |
| virtual void | SetSummaryProperty (const std::string &property, const std::string &value) |
| | Set a summary property.
|
| |
|
int64_t | SnapshotId () |
| | Get or generate the snapshot ID for the new snapshot.
|
| |
|
Status | DeleteFile (const std::string &path) noexcept |
| | Best-effort delete. Failed paths remain registered for later cleanup.
|
| |
|
void | RegisterStagedFile (const std::string &path) |
| |
|
void | UnregisterStagedFile (const std::string &path) |
| | Transfer cleanup ownership to the derived update.
|
| |
|
std::string | ManifestPath () |
| |
|
std::string | ManifestListPath () |
| |
|
OptionalExecutor | plan_executor () const |
| |
|
SnapshotSummaryBuilder & | summary_builder () |
| |
|
SnapshotSummaryBuilder | BuildManifestCountSummary (std::span< const ManifestFile > manifests, int32_t replaced_manifests_count) |
| |
|
| PendingUpdate (std::shared_ptr< TransactionContext > ctx) |
| |
|
const TableMetadata & | base () const |
| |
|
Status | CheckCommitAllowed () const |
| |
API for table changes that produce snapshots.
This class contains common methods for all updates that create a new table Snapshot. It also provides the shared implementation for snapshot ID assignment, manifest list writing, retry-safe apply, and cleanup.
In the default C++23 package, setters return a reference to the concrete derived update, so derived operations can be chained after base setters:
append.ToBranch("branch").AppendFile(file);
- Note
- Packages built with ICEBERG_CXX20_COMPAT=ON return SnapshotUpdate& from these setters, including for C++23 consumers. Call derived-specific operations separately; chaining base setters and Commit() remains supported.