You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "wgtmac (via GitHub)" <gi...@apache.org> on 2026/03/13 14:42:00 UTC

[PR] refactor: introduce TransactionContext to decouple Transaction and PendingUpdate [iceberg-cpp]

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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] refactor: introduce TransactionContext to decouple Transaction and PendingUpdate [iceberg-cpp]

Posted by "wgtmac (via GitHub)" <gi...@apache.org>.
wgtmac commented on PR #591:
URL: https://github.com/apache/iceberg-cpp/pull/591#issuecomment-4067987577

   Thanks all for the review!


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] refactor: introduce TransactionContext to decouple Transaction and PendingUpdate [iceberg-cpp]

Posted by "wgtmac (via GitHub)" <gi...@apache.org>.
wgtmac merged PR #591:
URL: https://github.com/apache/iceberg-cpp/pull/591


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org