wgtmac opened a new pull request, #591: URL: https://github.com/apache/iceberg-cpp/pull/591
Add TransactionContext to own the shared state (table, metadata_builder, kind) between Transaction and PendingUpdate. Both now hold a shared_ptr<TransactionContext> instead of PendingUpdate holding a weak_ptr<Transaction>. This fixes two issues: - pending_updates_ was weak_ptr, so dropping a PendingUpdate would silently break Finalize/retry; now Transaction holds shared_ptr - Table::New*() no longer creates a temporary Transaction; it creates a TransactionContext directly and passes it to the PendingUpdate, removing the circular dependency Also clean up related redundancy: - Hoist Transaction::Kind to a standalone enum class TransactionKind - Remove Transaction::kind_ (duplicate of ctx_->kind) - Remove auto_commit machinery; PendingUpdate::Commit() now calls txn->Commit() explicitly on the table-created path - TransactionContext::Make returns Result to propagate null table errors -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
