feat(transaction): Add TransactionAction and related classes#1420
Merged
liurenjie1024 merged 7 commits intoapache:mainfrom Jun 10, 2025
Merged
feat(transaction): Add TransactionAction and related classes#1420liurenjie1024 merged 7 commits intoapache:mainfrom
liurenjie1024 merged 7 commits intoapache:mainfrom
Conversation
Contributor
liurenjie1024
left a comment
There was a problem hiding this comment.
Thanks @CTTY for this pr, generally looks good! Just some minor suggestions.
ZENOTME
reviewed
Jun 10, 2025
| fn apply(self, tx: Transaction) -> Result<Transaction>; | ||
| } | ||
|
|
||
| impl<T: TransactionAction + 'static> ApplyTransactionAction for T { |
Contributor
There was a problem hiding this comment.
Does this apply will have different implementation? If not, maybe we can provide a "apply" function in Transaction directly, like:
let action1 ...
let action2 ...
let tx = Transaction::new(&table);
tx.apply(action1).apply(action2)..
Looks like these two method implement the same effect and just a function in Transaction maybe more clear.
Contributor
There was a problem hiding this comment.
It's an auto implementation and will be apply to all transaction actions.
Contributor
There was a problem hiding this comment.
This enables fluent api call like this:
let mut tx = action.add_file("x1")
.add_file("x2")
.apply(tx);
liurenjie1024
approved these changes
Jun 10, 2025
Contributor
liurenjie1024
left a comment
There was a problem hiding this comment.
Thanks @CTTY , LGTM!
Contributor
|
Let's wait for a while to see if others have concerns. |
Contributor
|
I'll merge this first to unblock following prs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
This is a part of the effort to refactor transaction commit path and enable retry for write operations.
Please find the POC here: #1400
Related Issues:
Transaction::commitmethod #1387TableMetadatato new location. #1388What changes are included in this PR?
TransactionAction,ActionCommit, andApplyTransactionActionactionsfield inTransactionAre these changes tested?
Added unit tests