Skip to content

core: Send single snapshot to remove rather than in bulk#13100

Merged
RussellSpitzer merged 2 commits into
apache:1.9.xfrom
aihuaxu:aixu-client-single-snapshot
May 21, 2025
Merged

core: Send single snapshot to remove rather than in bulk#13100
RussellSpitzer merged 2 commits into
apache:1.9.xfrom
aihuaxu:aixu-client-single-snapshot

Conversation

@aihuaxu
Copy link
Copy Markdown
Contributor

@aihuaxu aihuaxu commented May 19, 2025

#12670 introduces a behavior change that requires the REST catalog server to upgrade to 1.9.x as well, otherwise, the client with 1.9.x cannot talk to the existing server.

This PR is to revert back to the 1.8.x behavior in core that the client will send single snapshot to remove that the existing server can understand.

This PR is only fixing in 1.9.x branch.

@github-actions github-actions Bot added the core label May 19, 2025
@aihuaxu
Copy link
Copy Markdown
Contributor Author

aihuaxu commented May 19, 2025

@amogh-jahagirdar and @ricardopereira33 Can you please take a look? Thanks.

@nastra
Copy link
Copy Markdown
Contributor

nastra commented May 20, 2025

Should this be targeting 1.9.x only maybe? From how I understand things is that we want to produce a single snapshot to be removed for 1.9.1 and then get back to the existing code and potentially produce multiple snapshots during removal for 1.10.0 (main)

Copy link
Copy Markdown
Contributor

@amogh-jahagirdar amogh-jahagirdar left a comment

Choose a reason for hiding this comment

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

Yeah @aihuaxu I think this should be targeting the 1.9.x branch. I think the main branch can be left as is, since on the next release we'd have the ability for both clients/servers to work.

The change itself looks right but marking as requesting changes just to prevent merges into main (but please let me know if folks disagree with only merging this into 1.9.x)

@aihuaxu
Copy link
Copy Markdown
Contributor Author

aihuaxu commented May 20, 2025

Yeah @aihuaxu I think this should be targeting the 1.9.x branch. I think the main branch can be left as is, since on the next release we'd have the ability for both clients/servers to work.

The change itself looks right but marking as requesting changes just to prevent merges into main (but please let me know if folks disagree with only merging this into 1.9.x)

I think that works. Basically we are expecting the server to upgrade in 1.9.x and the clients finish the upgrade in 1.10.x. Let me make the change.

@aihuaxu aihuaxu force-pushed the aixu-client-single-snapshot branch from e6bb24c to 5971612 Compare May 20, 2025 15:44
@aihuaxu aihuaxu changed the base branch from main to 1.9.x May 20, 2025 15:45
@aihuaxu aihuaxu requested a review from amogh-jahagirdar May 20, 2025 15:46
@aihuaxu
Copy link
Copy Markdown
Contributor Author

aihuaxu commented May 20, 2025

@nastra and @amogh-jahagirdar Can you please review again? Thanks.

@aihuaxu
Copy link
Copy Markdown
Contributor Author

aihuaxu commented May 20, 2025

@RussellSpitzer I'm making the change to make snapshot expiry compatible with existing REST catalog server since you are releasing 1.9.x. It's a small change.

Comment on lines -1841 to -1845
changes.stream()
.anyMatch(
change ->
change instanceof MetadataUpdate.RemoveSnapshots
|| change instanceof MetadataUpdate.RemoveSnapshot);
Copy link
Copy Markdown
Contributor

@amogh-jahagirdar amogh-jahagirdar May 20, 2025

Choose a reason for hiding this comment

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

Shouldn't this part remain as is? That way if a server is handling the bulk update we still update the history entries. I know clients won't send it in this release, but it'd make the change more minimal

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sounds good. Let me revert this minimize the change.

@github-actions github-actions Bot removed the API label May 20, 2025
@aihuaxu aihuaxu requested a review from amogh-jahagirdar May 20, 2025 19:54
Copy link
Copy Markdown
Contributor

@amogh-jahagirdar amogh-jahagirdar left a comment

Choose a reason for hiding this comment

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

Ok this looks good to me. I tested this with a local Iceberg rest image running an older Iceberg version and expiration succeeds. Thank you @aihuaxu . I'll give it a bit in case @RussellSpitzer wanted to review, but will merge shortly

@RussellSpitzer RussellSpitzer merged commit f40208a into apache:1.9.x May 21, 2025
42 checks passed
@RussellSpitzer
Copy link
Copy Markdown
Member

Thank @aihuaxu, thanks to @amogh-jahagirdar for review

stevenzwu pushed a commit to stevenzwu/iceberg that referenced this pull request Jul 23, 2025
nastra pushed a commit that referenced this pull request Jul 24, 2025
…t 12670 by sending single snapshot rather than in bulk (#13647)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants