You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "dentiny (via GitHub)" <gi...@apache.org> on 2025/06/28 20:30:18 UTC

[PR] chore: make Transaction cloneable [iceberg-rust]

dentiny opened a new pull request, #1474:
URL: https://github.com/apache/iceberg-rust/pull/1474

   ## What changes are included in this PR?
   
   Iceberg supports retry on commit: https://iceberg.apache.org/docs/latest/configuration/#table-behavior-properties
   To implement retry, I would like to commit on a cloned transaction.
   
   Old code without retry:
   ```rs
   let action = txn.fast_append();
   let action = action.add_data_files(data_file_import_result.new_iceberg_data_files);
   txn = action.apply(txn)?;
   txn.commit(catalog)
   ```
   
   New code with retry:
   ```rs
   // Apply all changes.
   let action = txn.fast_append();
   let action = action.add_data_files(data_file_import_result.new_iceberg_data_files);
   txn = action.apply(txn)?;
   
   // Perform commit with retry.
   while count < max_retry && time < max_timeout {
     let txn_copy = txn.clone();
     txn.commit(catalog) // commit takes `mut self`, have to make a clone
   }
   ```
   
   ## Are these changes tested?
   
   No op change, but compilation and existing tests all pass.


-- 
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] chore: make Transaction cloneable [iceberg-rust]

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


-- 
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] chore: make Transaction cloneable [iceberg-rust]

Posted by "liurenjie1024 (via GitHub)" <gi...@apache.org>.
liurenjie1024 commented on PR #1474:
URL: https://github.com/apache/iceberg-rust/pull/1474#issuecomment-3017504234

   > For now, looks like we can't guarantee that the transaction can be retry again directly in semantics.🤔
   
   Why? Do you mean the `commit` method consumed transaction?


-- 
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] chore: make Transaction cloneable [iceberg-rust]

Posted by "ZENOTME (via GitHub)" <gi...@apache.org>.
ZENOTME commented on PR #1474:
URL: https://github.com/apache/iceberg-rust/pull/1474#issuecomment-3016853008

   I think the retry commit is implement in the commit internally. For now, looks like we can't guarantee that the transaction can be retry again directly in semantics.🤔


-- 
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] chore: make Transaction cloneable [iceberg-rust]

Posted by "dentiny (via GitHub)" <gi...@apache.org>.
dentiny commented on PR #1474:
URL: https://github.com/apache/iceberg-rust/pull/1474#issuecomment-3017513079

   > Thanks @dentiny for this pr. I'm fine with the changes, but I want to claeify that tx commit is under development, and should happend in `commit` method internally.
   
   Yeah I totally understand.
   Thank you for the quick 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