Skip to content

feat(transaction): Implement TransactionAction for FastAppendAction #1448

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jun 18, 2025

Conversation

CTTY
Copy link
Contributor

@CTTY CTTY commented Jun 16, 2025

Which issue does this PR close?

Related Issues:

What changes are included in this PR?

BREAKING CHANGES:

  • ManifestWriter now takes key_metadata: Option<Vec<u8>> instead of key_metadata: Vec<u8>
  • Replaced FastAppendAction::apply with commitas an implementation of TransactionAction

General:

  • Implement TransactionAction for FastAppendAction
  • Changed SnapshotProduceAction to SnapshotProducer
    • The idea is to make SnapshotProduceAction an stateless helper class that helps with fast_append::commit (as discussed here)

Are these changes tested?

Added unit tests

@CTTY CTTY marked this pull request as ready for review June 16, 2025 23:47
Copy link
Contributor

@liurenjie1024 liurenjie1024 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @CTTY for this pr, generally looks good!

Copy link
Contributor

@liurenjie1024 liurenjie1024 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @CTTY for this pr, LGTM!

@liurenjie1024 liurenjie1024 merged commit 086dff7 into apache:main Jun 18, 2025
17 checks passed
@CTTY CTTY deleted the ctty/tx-impl-3 branch June 18, 2025 15:55
@@ -127,7 +127,7 @@ impl ManifestWriter {
pub(crate) fn new(
output: OutputFile,
snapshot_id: Option<i64>,
key_metadata: Vec<u8>,
key_metadata: Option<Vec<u8>>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an API change, would appreciate if we could call it out at PR description and release notes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry about that! I've updated the PR description.

cc @liurenjie1024 probably related to the release process: Is there a "staging release notes" that we can start putting changes like this into as breaking changes?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking about adding a breaking label to pr so that it standout when we generate release notes.


/// Finished building the action and apply it to the transaction.
pub async fn apply(self) -> Result<Transaction> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an API change, would appreciate PR description and release notes, even provide a small example for no-op migration.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the PR description accordingly as well

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants