Skip to content

[python][ray] Incrementally commit update_by_row_id file groups - #8826

Draft
XiaoHongbo-Hope wants to merge 12 commits into
apache:masterfrom
XiaoHongbo-Hope:update_by_row_id_incremental_commit
Draft

[python][ray] Incrementally commit update_by_row_id file groups#8826
XiaoHongbo-Hope wants to merge 12 commits into
apache:masterfrom
XiaoHongbo-Hope:update_by_row_id_incremental_commit

Conversation

@XiaoHongbo-Hope

@XiaoHongbo-Hope XiaoHongbo-Hope commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Purpose

For large update_by_row_id jobs, a single final commit makes late failures expensive because all uncommitted file groups must be rewritten.

Add optional max_groups_per_commit windows while keeping the default single atomic commit. In incremental mode, ordinary group exceptions are returned as results so successful groups can be committed before the error is raised. Worker loss and other task-level failures which bypass Python exception handling may still lose results buffered by that task.

Tests

  • Relevant Python regressions: 143 passed, 10 subtests.
  • Python 3.6 compatibility: 92 passed.
  • Flake8, py_compile, and diff checks passed.

@XiaoHongbo-Hope
XiaoHongbo-Hope marked this pull request as ready for review July 26, 2026 12:18
@XiaoHongbo-Hope
XiaoHongbo-Hope force-pushed the update_by_row_id_incremental_commit branch 3 times, most recently from 9e0ef29 to 8612798 Compare July 26, 2026 12:52
Comment thread paimon-python/pypaimon/ray/data_evolution_merge_join.py Outdated
@XiaoHongbo-Hope
XiaoHongbo-Hope marked this pull request as draft July 27, 2026 00:17
@XiaoHongbo-Hope
XiaoHongbo-Hope marked this pull request as ready for review July 27, 2026 08:13

@Zouxxyy Zouxxyy 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.

Two findings from this review:

Comment thread paimon-python/pypaimon/ray/data_evolution_merge_join.py Outdated
Comment thread paimon-python/pypaimon/write/file_store_commit.py Outdated
@XiaoHongbo-Hope
XiaoHongbo-Hope marked this pull request as draft July 27, 2026 09:38
@XiaoHongbo-Hope
XiaoHongbo-Hope marked this pull request as ready for review July 27, 2026 09:46

@JingsongLi JingsongLi 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.

Just looking at the changes alone, it's too complicated; we need a simpler, more straightforward approach.

@XiaoHongbo-Hope
XiaoHongbo-Hope force-pushed the update_by_row_id_incremental_commit branch from 436c400 to 7615310 Compare July 28, 2026 18:35
@XiaoHongbo-Hope

Copy link
Copy Markdown
Contributor Author

Just looking at the changes alone, it's too complicated; we need a simpler, more straightforward approach.

Got your point, just left core change now.

@XiaoHongbo-Hope
XiaoHongbo-Hope force-pushed the update_by_row_id_incremental_commit branch from ed04263 to 5d0b467 Compare July 29, 2026 03:31
@XiaoHongbo-Hope
XiaoHongbo-Hope force-pushed the update_by_row_id_incremental_commit branch from 5d0b467 to 883da03 Compare July 29, 2026 03:34

@leaves12138 leaves12138 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.

I found one blocking cleanup issue. The focused Ray update/merge/read test suites pass, but an incremental driver-side commit failure can abandon already-materialized group outputs.

Comment thread paimon-python/pypaimon/ray/data_evolution_merge_join.py Outdated
@JingsongLi

Copy link
Copy Markdown
Contributor

Incremental commits are not atomic across the whole operation. Ordinary exceptions
raised while applying a group are reported as results so other groups can finish;
completed groups are flushed before the error is raised.
Ray task retry options in ray_remote_args do not retry group exceptions reported
as results, so a transient group failure can leave a partial update. Worker loss and
other task-level failures which bypass Python exception handling may still lose
results buffered by that task.

If this is indeed the case, as stated in your documentation, then the implications are significant—far beyond what a simple description like “max_groups_per_commit” can capture. This is a major semantic change that has been overlooked.

@XiaoHongbo-Hope

Copy link
Copy Markdown
Contributor Author

Incremental commits are not atomic across the whole operation. Ordinary exceptions
raised while applying a group are reported as results so other groups can finish;
completed groups are flushed before the error is raised.
Ray task retry options in ray_remote_args do not retry group exceptions reported
as results, so a transient group failure can leave a partial update. Worker loss and
other task-level failures which bypass Python exception handling may still lose
results buffered by that task.

If this is indeed the case, as stated in your documentation, then the implications are significant—far beyond what a simple description like “max_groups_per_commit” can capture. This is a major semantic change that has been overlooked.

Updated, can you help check whether this looks good.

@XiaoHongbo-Hope
XiaoHongbo-Hope marked this pull request as draft July 30, 2026 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants