Skip to content

[Data][2/4] iceberg checkpoint state utilities - #66503

Closed
smortime wants to merge 4 commits into
ray-project:masterfrom
smortime:smortimer/minimal-iceberg-checkpoint-state
Closed

smortime wants to merge 4 commits into
ray-project:masterfrom
smortime:smortimer/minimal-iceberg-checkpoint-state

Conversation

@smortime

@smortime smortime commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds iceberg operation and pending-checkpoint state utilities that are needed to support APPEND operations.

Related issues

Related to #59870

Additional information

High level of the state helpers:

  • Create and validate the checkpoint namespace for a specific Iceberg table.
  • Build and parse deterministic task checkpoint IDs.
  • Find pending checkpoints and group them by operation.
  • Promote an operation’s pending checkpoints to committed checkpoints.
  • Discard an uncommitted operation’s pending checkpoints.
  • Delete the complete checkpoint namespace after successful cleanup.
  • Reject mismatched table identities, malformed checkpoint names, and unsupported legacy layouts.

Essentially, the building blocks for iceberg checkpointing are further up PRs.

Iceberg Checkpointing Stack:

@smortime smortime changed the title Smortimer/minimal iceberg checkpoint state [Data][1/n] iceberg checkpoint state utilities Sep 26, 2026
@smortime smortime changed the title [Data][1/n] iceberg checkpoint state utilities [Data][1/4] iceberg checkpoint state utilities Sep 26, 2026
@smortime smortime changed the title [Data][1/4] iceberg checkpoint state utilities [Data][2/4] iceberg checkpoint state utilities Sep 26, 2026
@smortime
smortime marked this pull request as ready for review September 26, 2026 04:47
@smortime
smortime requested a review from a team as a code owner September 26, 2026 04:47

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces IcebergCheckpointState to manage operation-level row-checkpoint state for Iceberg tables, updates checkpoint loading to exclude pending files, and allows deferring success cleanup. The review feedback highlights several optimization and robustness opportunities, including replacing posixpath.relpath with a prefix-stripping approach to avoid Windows compatibility issues, batching sequential get_file_info calls to reduce metadata RPCs, and passing pre-fetched FileInfo objects to _read_namespace to eliminate redundant filesystem queries.

@ray-gardener ray-gardener Bot added data Ray Data-related issues community-contribution Contributed by the community labels Sep 26, 2026
richardliaw pushed a commit that referenced this pull request Sep 30, 2026
…oint restore (#66387)

## Description

During checkpoint restoration, instead of passing the entire checkpoint
directory, which may contain pending files, pass only the committed
`.parquet`.

## Related issues

Related to #59870

## Additional information

This isn't directly part of supporting iceberg checkpointing, but was
teased out of the implementation / added first, so it can be merged
without concern of iceberg-related items.

Stack:
- #66387 (you are here)
- #66503
- #66504
- #66505

Signed-off-by: Schuyler Mortimer <[email protected]>
@smortime
smortime force-pushed the smortimer/minimal-iceberg-checkpoint-state branch from 70b1e1e to bb2e0d3 Compare October 2, 2026 18:12

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

nadongjun pushed a commit to nadongjun/ray that referenced this pull request Oct 6, 2026
…oint restore (ray-project#66387)

## Description

During checkpoint restoration, instead of passing the entire checkpoint
directory, which may contain pending files, pass only the committed
`.parquet`.

## Related issues

Related to ray-project#59870

## Additional information

This isn't directly part of supporting iceberg checkpointing, but was
teased out of the implementation / added first, so it can be merged
without concern of iceberg-related items.

Stack:
- ray-project#66387 (you are here)
- ray-project#66503
- ray-project#66504
- ray-project#66505

Signed-off-by: Schuyler Mortimer <[email protected]>
Signed-off-by: Schuyler Mortimer <[email protected]>
@smortime
smortime force-pushed the smortimer/minimal-iceberg-checkpoint-state branch from bb2e0d3 to 02e2af9 Compare October 7, 2026 15:55
Signed-off-by: Schuyler Mortimer <[email protected]>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

There are 3 total unresolved issues (including 1 from previous review).

Fix All in Cursor

Reviewed by Cursor Bugbot for commit 3a16038. Configure here.

Signed-off-by: Schuyler Mortimer <[email protected]>
@AarryaSaraf

Copy link
Copy Markdown
Contributor

Hi, thank you for your contribution! We did a major refactor of our readers with a new architecture we call DatasourceV2. Iceberg will soon be migrated to it and this version will be deprecated. Given all of this, I think its best to hold off on implementing this now, and we can do it directly on the new version instead.

@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had
any activity for 14 days. It will be closed in another 14 days if no further activity occurs.
Thank you for your contributions.

You can always ask for help on our discussion forum or Ray's public slack channel.

If you'd like to keep this open, just leave any comment, and the stale label will be removed.

@github-actions github-actions Bot added the stale The issue is stale. It will be closed within 7 days unless there are further conversation label Oct 22, 2026
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

This pull request has been automatically closed because there has been no more activity in the 14 days
since being marked stale.

Please feel free to reopen or open a new pull request if you'd still like this to be addressed.

Again, you can always ask for help on our discussion forum or Ray's public slack channel.

Thanks again for your contribution!

@github-actions github-actions Bot closed this Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Contributed by the community data Ray Data-related issues stale The issue is stale. It will be closed within 7 days unless there are further conversation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants