Skip to content

[Fix][Zeta] prevent cancel stuck and downgrade tmp cleanup failure - #10729

Merged
dybyte merged 1 commit into
apache:devfrom
corgy-w:corgy/check-dev-issues
Apr 20, 2026
Merged

dybyte merged 1 commit into
apache:devfrom
corgy-w:corgy/check-dev-issues

Conversation

@corgy-w

@corgy-w corgy-w commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

What changed

  • make file sink transaction directory cleanup best-effort after data files have already been renamed into place
  • mark tasks as CANCELED locally when a cancel request cannot receive a terminal callback because the execution member becomes unavailable

Why

The current dev branch still has two edge cases:

  1. FileSinkAggregatedCommitter treats tmp directory cleanup failure as commit failure even after data files are successfully committed.
  2. PhysicalVertex can stay in CANCELING when the execution member disappears before sending back a terminal callback.

Impact

  • avoid failing a checkpoint on post-commit tmp cleanup errors
  • prevent Zeta task cancellation from getting stuck when the target worker is gone

Validation

  • ./mvnw spotless:apply
  • started ./mvnw -q -DskipTests verify, then stopped it due to long runtime and proceeded with a draft PR as requested so CI can validate online

@DanielLeens DanielLeens 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 pulled this PR locally and I like the direction, but I do not think it is merge-ready without focused regression coverage for the two runtime paths being changed.

  1. PhysicalVertex.noticeTaskExecutionServiceCancel() now locally marks the task as CANCELED when the current member disappears during cancel. That is a task-state-machine change in the cancel/failover path, and it needs a targeted regression test that reproduces the original "cancel stuck" case and proves we do not regress task completion semantics.

  2. FileSinkAggregatedCommitter.commit() now swallows transaction-directory cleanup failures after successful rename and still treats the checkpoint commit as successful. That may be the right behavior, but it also changes the commit contract and should have a small committer regression test so future refactors do not silently reintroduce the downgrade tmp-cleanup failure.

Because both changes touch terminal/commit behavior and neither path is covered in this PR, I am still at request-changes for now.

@corgy-w
corgy-w force-pushed the corgy/check-dev-issues branch from b066d31 to 6d38d36 Compare April 9, 2026 13:57

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

Thanks for the update. I pulled the latest branch locally and the two runtime adjustments still need focused regression coverage before I’m comfortable with the change.

The PR changes checkpoint commit semantics in FileSinkAggregatedCommitter and cancel-state fallback in PhysicalVertex, but it still does not add tests that prove those exact paths: one where tmp cleanup fails after a successful rename, and one where a canceling task loses its member before the terminal callback arrives. Without those cases, we still don't have evidence that the new behavior is correct or that it won't mask other failure modes.

Please add targeted regression tests for both runtime paths.

@corgy-w
corgy-w force-pushed the corgy/check-dev-issues branch from 6d38d36 to 4717b32 Compare April 12, 2026 13:53
DanielLeens

This comment was marked as duplicate.

@davidzollo
davidzollo marked this pull request as ready for review April 15, 2026 14:21

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

+1
Good job

@DanielLeens

Copy link
Copy Markdown
Contributor

Hi @corgy-w, I rechecked the current head locally as seatunnel-review-10729. The PR head is unchanged since my previous Daniel review; the only new activity is later review approval.

The same runtime areas are affected:

cancel path
  -> PhysicalVertex.cancel()
      -> state transition toward CANCELING/CANCELED

file tmp cleanup path
  -> FileSinkAggregatedCommitter.abort/commit cleanup
      -> tmp cleanup failure is downgraded/logged instead of blocking state convergence

Because there is no code or test change after my previous CHANGES_REQUESTED review, my earlier request still stands. The latest CI is green, which is good, but the review concern was about targeted regression coverage for the cancel-state and tmp-cleanup behavior.

Conclusion: can merge after fixes

Blocking item:

  1. Please add focused regression coverage for the state transition / cleanup failure paths changed by this PR.

Once that coverage is in place, this should be much easier to merge confidently.

@dybyte dybyte left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1

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