You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "SeaSand1024 (via GitHub)" <gi...@apache.org> on 2026/09/19 03:21:36 UTC
[PR] [Fix][Zeta] Close all flow lifecycles even when an earlier close fails [seatunnel]
SeaSand1024 opened a new pull request, #12391:
URL: https://github.com/apache/seatunnel/pull/12391
### Purpose of this PR
Fixes #12231.
`SeaTunnelTask.close()` only caught `IOException` while iterating each flow
lifecycle's `close()`. An unchecked exception (e.g. `RuntimeException`) thrown by an
earlier lifecycle escaped the teardown loop, so every later lifecycle was never
closed — leaking executors, connections and buffers on task teardown.
### Changes
`seatunnel-engine/seatunnel-engine-server/.../SeaTunnelTask.java`:
- Catch `Throwable` (checked `IOException`, unchecked `RuntimeException`, and `Error`)
around each lifecycle's `close()` so a single failure never aborts the teardown loop.
- Keep teardown order; preserve the **first** failure and attach subsequent failures as
**suppressed** via `Throwable#addSuppressed`.
- Rethrow the first failure at the end: `IOException` stays declared as `IOException`;
other checked/unchecked failures are rethrown via `sneakyThrow`.
- Javadoc updated to reflect the new semantics.
### Tests
Extended the existing `SeaTunnelTaskStateTest` with deterministic coverage:
- `testCloseAttemptsEveryCycleWhenEarlierCycleThrowsUnchecked` — an unchecked close
failure from an earlier lifecycle no longer skips later lifecycles.
- `testCloseAttemptsEveryCycleWhenEarlierCycleThrowsIoException` — same guarantee for a
checked failure.
- `testClosePreservesFirstFailureAndAttachesOthersAsSuppressed` — first failure is
preserved as the thrown exception; subsequent failures are attached as suppressed.
Change is scoped to task cleanup + its tests; no unrelated refactors, no config/API
changes.
### Self-review checklist
- [ ] Teardown order preserved; every initialized lifecycle is attempted.
- [ ] First failure preserved; subsequent failures suppressed.
- [ ] Deterministic coverage for checked vs unchecked failures and multi-failure cases.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Zeta] Close all flow lifecycles even when an earlier close fails [seatunnel]
Posted by "SeaSand1024 (via GitHub)" <gi...@apache.org>.
SeaSand1024 commented on PR #12391:
URL: https://github.com/apache/seatunnel/pull/12391#issuecomment-5929739215
Re-ran `all-connectors-it-5 (8, ubuntu-latest)` on `57890813b` (attempt 2): **failure** — https://github.com/SeaSand1024/seatunnel/actions/runs/35870424836/job/110327089414
Public annotations only show exit code 1; I cannot download job logs from this environment. Prior attempt on the same tip failed in `OceanBaseCDCCompatibilityIT.testOceanBaseCdcWrapperRuntimeE2e` (`ProgramInvocationException: The main method caused an error: Flink job executed failed`). Someone with fork Actions access should paste the OceanBase/Surefire snippet from attempt 2 so we can confirm it matches before merge.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Zeta] Close all flow lifecycles even when an earlier close fails [seatunnel]
Posted by "SeaSand1024 (via GitHub)" <gi...@apache.org>.
SeaSand1024 commented on PR #12391:
URL: https://github.com/apache/seatunnel/pull/12391#issuecomment-5929814461
Triage on the repeat `OceanBaseCDCCompatibilityIT` Flink failure (attempt 2 job https://github.com/SeaSand1024/seatunnel/actions/runs/35870424836/job/110327089414):
- Flink: `Error in serialization` / `serializedUDF` (Zeta green) — matches the packaging bug fixed by merged #12477 (`Stop bundling debezium-core in the OceanBase CDC jar`). That PR already reproduced this on plain `dev` and unrelated PRs (e.g. apache run https://github.com/apache/seatunnel/actions/runs/35999263398/job/107632711731). No separate tracking issue; #12489 closed as duplicate of #12477.
- This tip `57890813b` (dev sync 2026-09-23) predates #12477 (merged 2026-09-27); current `dev` has the fix.
- No evidence this ties to `SeaTunnelTask.close()` / this PR’s three files. Next step from our side: merge latest `dev` to pick up #12477 (no close-path edits).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Zeta] Close all flow lifecycles even when an earlier close fails [seatunnel]
Posted by "SEZ9 (via GitHub)" <gi...@apache.org>.
SEZ9 commented on PR #12391:
URL: https://github.com/apache/seatunnel/pull/12391#issuecomment-6307735508
Thanks for the follow-up work here. Looking at the current head (2a5e21fe, a merge of `dev`; the rest of the diff matches 6ad74f1f), here is where I stand on my earlier points:
1. **Double close / idempotency** – The `AtomicBoolean closed` latch with `compareAndSet(false, true)` plus the `try/finally` around `close()` in the CLOSED and CANCELLING branches addresses this. Resolved from my side.
2. **`catch (Throwable)` swallowing fatal errors** – Stopping the loop early for `VirtualMachineError` / `ThreadDeath` and letting an `Error` take priority over an `Exception` covers the concern in `SeaTunnelTask`. One remaining question: does the `BlockingWorker` fallback rethrow (rather than only log) when the propagated failure is an `Error`, so a fatal error during close is not downgraded to a log line?
3. **Test coverage** – With `closeSuper()` extracted, could you point me to (or add) tests that exercise (a) `closeSuper()` throwing while the lifecycle loop still runs, and (b) the `BlockingWorker` fallback path hitting the already-closed latch and absorbing an unchecked close failure?
4. **Javadoc / log context** – Logging with task location + lifecycle name resolves the correlation half. Please double-check that the throws documentation on `close()` and `closeSuper()` matches the new flow (first failure rethrown, `IOException` as is, other throwables rethrown unwrapped, remaining failures attached as suppressed).
5. **`allCycles` null guard** – Is `allCycles` now guarded before the iteration for the case where `init()` failed before it was assigned? If not, a simple null check (or treating it as an empty list) in `close()` would close this one out.
Once items 2–5 are confirmed or addressed, I think this is good to go.
<!-- streview-comment:1920 -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Zeta] Close all flow lifecycles even when an earlier close fails [seatunnel]
Posted by "SEZ9 (via GitHub)" <gi...@apache.org>.
SEZ9 commented on PR #12391:
URL: https://github.com/apache/seatunnel/pull/12391#issuecomment-5975655877
Thanks @SeaSand1024 for calling out the classloader-restore consequence explicitly.
**On F2:** agreed that an `Error` escaping the BlockingWorker fallback before `setContextClassLoader(oldClassLoader)` is not a merge blocker on its own; if the JVM is already in an OOM / `StackOverflowError` state, an unrestored context classloader is the least of the problems. A nested `try/finally` so the restore runs unconditionally is small and I would take it as polish, but if you would rather leave it, just say so.
**What I want to resolve before merge** is how the narrowed `catch (Exception)` interacts with the close-once latch at `877056bf1`:
- A lifecycle `close()` that throws an `Error` (realistically `NoClassDefFoundError` from a connector classloader, not OOM) now escapes the per-lifecycle loop, so every lifecycle after it is skipped.
- Could you confirm when the `closed` latch is set relative to that loop? If it is already set when the `Error` escapes, the fallback's second `close()` becomes a no-op and nothing ever closes the remaining lifecycles.
If so, F1 (idempotency) and F2 (not swallowing fatal errors) are individually right, but combined they lose the full-pass guarantee for exactly the unchecked-failure class this PR exists to handle. Two options, either is fine:
1. In the per-lifecycle loop, catch `Throwable`, keep iterating so the full pass completes, then rethrow the first failure, with an `Error` taking priority over any `Exception` so a fatal error is never downgraded to a log line.
2. Keep `catch (Exception)` in the loop but only set `closed` after the loop has completed the full pass, so an escaping `Error` leaves the latch unset and the fallback can still finish teardown.
I lean to option 1 as the smaller behavioral surface.
**F3:** please add one test that drives the `Error`-from-a-lifecycle case end to end (lifecycle A throws `NoClassDefFoundError`, assert lifecycle B still gets `close()` and the `Error` is what surfaces), plus one for the `super.close()` failure branch.
**F1 / F5:** could you point me to the relevant hunks at `877056bf1` (the close-once latch and the null `allCycles` guard) so I can close them out? **F4** is fine once the Javadoc throws clauses match whichever option you pick above.
<!-- streview-comment:1492 -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Zeta] Close all flow lifecycles even when an earlier close fails [seatunnel]
Posted by "SeaSand1024 (via GitHub)" <gi...@apache.org>.
SeaSand1024 commented on PR #12391:
URL: https://github.com/apache/seatunnel/pull/12391#issuecomment-5944220798
@DanielLeens @SEZ9 follow-up on tip `2cc06fc43` (dev sync picking up #12477).
**Closed out from last ask:** `all-connectors-it-5` is green on both JDKs after the sync — OceanBase Flink `serializedUDF` no longer fails (as expected with #12477).
Build still reports FAILURE on that run for three other jobs (none are close-path / OceanBase). Attribution from the logs:
1. `unit-test (11, ubuntu-latest)` https://github.com/SeaSand1024/seatunnel/actions/runs/36852053400/job/110336780523
`SavePointTest.testSavePointButJobGoingToFail` — `expected: <RUNNING> but was: <FAILED>` within 2 minutes. Checkpoint/savepoint path; not the three files in this PR. Possibly adjacent to open #12441 (`startSavepoint` lock). Re-running this job now.
2. `all-connectors-it-2 (8, ubuntu-latest)` https://github.com/SeaSand1024/seatunnel/actions/runs/36852053400/job/110336781393
Not a test assertion — Maven `DependencyResolutionException` transferring `hadoop-annotations:3.3.4` from Central while resolving `connector-cdc-mongodb-e2e`. Re-running.
3. `oracle-cdc-connector-it (8, ubuntu-latest)` https://github.com/SeaSand1024/seatunnel/actions/runs/36852053400/job/110336781621
Maven wrapper download 404 (infra; no Surefire reports). Re-running.
Failed-jobs re-run for those three: https://github.com/SeaSand1024/seatunnel/actions/runs/36852053400 — will post results when finished. No new commits; close-path untouched.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Zeta] Close all flow lifecycles even when an earlier close fails [seatunnel]
Posted by "SeaSand1024 (via GitHub)" <gi...@apache.org>.
SeaSand1024 commented on PR #12391:
URL: https://github.com/apache/seatunnel/pull/12391#issuecomment-5965898097
@SEZ9 @DanielLeens one deliberate consequence of F2 (`catch (Exception)` only in the BlockingWorker fallback `finally`): if fallback `close()` throws a fatal JVM `Error` (OOM / ThreadDeath / StackOverflowError), that exception escapes before `setContextClassLoader(oldClassLoader)`, so the worker thread’s context classloader stays unrestored. Only relevant when the JVM is already unrecoverable; not treated as a merge blocker. Nested-`finally` restore would be optional polish.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Zeta] Close all flow lifecycles even when an earlier close fails [seatunnel]
Posted by "SeaSand1024 (via GitHub)" <gi...@apache.org>.
SeaSand1024 commented on PR #12391:
URL: https://github.com/apache/seatunnel/pull/12391#issuecomment-6015803276
@DanielLeens @SEZ9 addressed on tip `563fd4e8a` (close-path + tests only; no #12353/#12311).
**Issue 1 (Error + close-once latch):** per-lifecycle `catch (Throwable)`; full pass continues for non-fatal Errors (`NoClassDefFoundError` / `AssertionError` / `LinkageError`); early-stop only for `VirtualMachineError` / `ThreadDeath`; rethrow prefers `Error` over earlier `Exception`. Tests flipped/added accordingly (`testCloseAttemptsEveryCycleWhenCycleThrowsNoClassDefFoundError`, AssertionError case, `testCloseStopsLoopOnVirtualMachineError`, `testClosePrefersErrorOverEarlierException`).
**Issue 2 / polish (BlockingWorker classloader):** `setContextClassLoader(oldClassLoader)` moved into nested `finally` so restore always runs.
**F3 / comments / Javadoc:** end-to-end NCDFE coverage + existing `super.close()` failure test kept; comments on `closeSuper()` (prod Exception unreachable / test seam) and non-transient `closed`; `@throws` updated for the Error policy.
**engine-v2-it (8) on `877056bf1` run `37097098821`:** failsafe shows one error — `SplitClusterFaultToleranceIT.testStreamJobCancelResolvesWhenWorkerCrashesBeforeCancelAck` — `expected: <CANCELED> but was: <FAILED>` (`ConditionTimeoutException` at `assertEventuallyCanceled`). Same cancel-vs-FAILED class as #12353; not close-path / lifecycle teardown. Not folded into this tip.
Local: `SeaTunnelTaskStateTest` 41/0/0 + BlockingWorker fallback test green.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Zeta] Close all flow lifecycles even when an earlier close fails [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #12391:
URL: https://github.com/apache/seatunnel/pull/12391#issuecomment-5759083178
Thanks for the clear CI breakdown, @SeaSand1024, and for keeping this PR scoped. I would keep it exactly as it is: please do not fold the #12353 / #12377 cancel-race fix into #12391. That fix touches `SubPlan` terminal-state selection, which is a different contract from the close-all-flow-lifecycles change here, and mixing the two would make both harder to review and to revert.
On my side, the source-level points from my last review on `0fc63dc5` are closed, so I do not see a new code-side blocker in this PR. The remaining gate is CI on the fork run.
What I can see from the fork run for this head (run attempt 3): the failed jobs are `engine-v2-it` and `all-connectors-it-2` on both JDK 8 and JDK 11, and the unit-test matrix is not among them. That matches your description. I have not independently re-read each individual assertion line in those job logs, so please treat the attribution below as a reading of the job names plus your notes rather than a log-level proof:
- `SplitClusterFaultToleranceIT.testStreamJobCancelResolvesWhenWorkerCrashesBeforeCancelAck` (expected `CANCELED`, got `FAILED`) is the known cancel-versus-worker-loss race. It is not in the code this PR changes. Fixes for it are open as #12311 (resolves a CANCELING vertex to CANCELED when its worker is lost) and #12377 (preserve cancellation after worker failure); neither is in `dev` yet, so syncing `dev` will not clear it.
- `OpengaussCDCIT` lives in `all-connectors-it-2` and does not touch the engine lifecycle code in this PR.
Suggested next step: use "Re-run failed jobs" only, and do not add unrelated changes to this branch. If the same two jobs stay red after a re-run, please paste the new failing job links here and I will take another look at that exact head. A committer can then decide whether to merge on the strength of the green unit-test matrix plus the known-flake attribution, or wait for #12311 / #12377 to land first.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Zeta] Close all flow lifecycles even when an earlier close fails [seatunnel]
Posted by "SeaSand1024 (via GitHub)" <gi...@apache.org>.
SeaSand1024 commented on PR #12391:
URL: https://github.com/apache/seatunnel/pull/12391#issuecomment-6032306385
@SEZ9 @DanielLeens follow-up on tip `6ad74f1fb` (close-path/tests only).
**1. Classloader assert:** dropped the tautological Awaitility assert in `testBlockingWorkerFallbackCloseWhenCallAndCloseThrowRuntimeException` — it compared classloaders on the test thread and could not observe the worker's nested-`finally` restore. Comment now states that. Production restore unchanged.
**2. F3 / BlockingWorker RuntimeException path:** still covers unchecked close after the Error-policy change. `CallAndCloseThrowRuntimeExceptionTask.close()` throws `RuntimeException("close-fail")`; BlockingWorker fallback still `catch (Exception)` and logs `Close task error`. Error-policy only widened the lifecycle loop in `SeaTunnelTask.close()`; the fallback Exception catch is unchanged.
**3. CI on Build 37460272377 (tip `563fd4e8a`):**
- `all-connectors-it-7 (8)`: `PostgresCDCIT.testPostgresCdcSnapshotOnlyAndCommittedOffsetStartupModes{TestContainer}[1]` — expected 1 / got 0 (Zeta). Not close-path.
- `transform-v2-it-part-1 (11)`: `TestFilterRowKindIT.testFilterRowKindMultiTable{TestContainer}[1]` on Flink:1.18.0 — expected 0 / got 1. Matches #12116. Not close-path.
Local: BlockingWorker fallback test 1/0/0 after the assert drop.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Zeta] Close all flow lifecycles even when an earlier close fails [seatunnel]
Posted by "SeaSand1024 (via GitHub)" <gi...@apache.org>.
SeaSand1024 commented on PR #12391:
URL: https://github.com/apache/seatunnel/pull/12391#issuecomment-5965582572
@SEZ9 @DanielLeens F1–F5 addressed on tip `877056bf1` (close-path + tests only).
**F1 idempotency:** `AtomicBoolean closed` makes `close()` a no-op on re-entry; `progress.done()` is in `finally` on CLOSED/CANCELLING. Repeated-close test now asserts `times(1)`.
**F2 catch narrowing:** lifecycle teardown and BlockingWorker fallback close catch `Exception` only so fatal JVM `Error`s propagate (Error test expects later cycles not closed).
**F5 `super.close()` + `allCycles`:** `closeSuper()` + `catch (Exception)`; loop guarded with `if (allCycles != null)`.
**F4 Javadoc + log:** `@throws` updated; per-lifecycle log includes `taskLocation` and lifecycle simple name.
**F3 tests:** `testClosePreservesSuperCloseFailureAndAttachesLifecycleFailuresAsSuppressed`, null-`allCycles`, CLOSED `progress.done()` on close failure; `testBlockingWorkerFallbackCloseWhenCallAndCloseThrowRuntimeException` for call()+close() both throwing RuntimeException.
Local: `SeaTunnelTaskStateTest` — Tests run: 38, Failures: 0, Errors: 0, Skipped: 0.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Zeta] Close all flow lifecycles even when an earlier close fails [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #12391:
URL: https://github.com/apache/seatunnel/pull/12391#issuecomment-5805501879
Thanks @SeaSand1024 for the sync and the direct job links. I checked this the same way as last time: `git compare` between the previously-reviewed head (0fc63dc5) and the new one (57890813b) shows 28 commits and 177 changed files, none of which are this PR's own three files (`TaskExecutionService.java`, `SeaTunnelTask.java`, `SeaTunnelTaskStateTest.java`). So this is confirmed a pure dev-sync -- zero overlap with the diff I already reviewed -- and doesn't reopen the code review.
On the CI picture: `OpengaussCDCIT.testAddFieldWithRestore` going green on both JDKs in your linked runs matches the expected outcome now that #12346 (merged to dev on 2026-09-20) is picked up by the sync. `engine-v2-it` staying out of scope is still correct -- `SplitClusterFaultToleranceIT` depends on #12311, which hasn't merged yet, so that failure mode is unrelated to this PR's diff and untouched by the sync.
My conclusion is unchanged: the code side has been ready since my last review, and the one CI gap that was attributable to something fixable (the Opengauss job) is now closed. This is ready to merge on the green unit-test matrix plus the now-green `all-connectors-it-2`, without waiting on the separately-tracked engine-v2-it flakes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Zeta] Close all flow lifecycles even when an earlier close fails [seatunnel]
Posted by "SEZ9 (via GitHub)" <gi...@apache.org>.
SEZ9 commented on PR #12391:
URL: https://github.com/apache/seatunnel/pull/12391#issuecomment-5852033340
Quick follow-up on where this stands from my side.
My last formal review submission was against `0fc63dc5`, and the branch has since picked up the `dev` sync (merge `57890813b`). Based on the re-read posted above, the actual diff on `57890813b` is unchanged from `0fc63dc5` and the earlier review points remain resolved, so I have nothing new to raise on the code itself.
The one thing still open before I'd refresh my formal review state on the current head is the CI picture from fork run `35870424836`:
- `transform-v2-it-part-1 (11, ubuntu-latest)` (job `107213895413`): the `TestFilterRowKindIT.testFilterRowKindMultiTable` failure matches the already-filed flake in #12116, and nothing in this diff touches `AssertSinkWriter`. I'm fine treating that as pre-existing noise.
- `all-connectors-it-5 (8, ubuntu-latest)` (job `107213895383`): `OceanBaseCDCCompatibilityIT.testOceanBaseCdcWrapperRuntimeE2e` failing with `Flink job executed failed`. This runs against the Flink translation layer rather than the Zeta `SeaTunnelTask.close()` path this PR changes, so I don't see a mechanism for the diff to cause it, but there is only one occurrence and no pre-filed issue for this exact symptom yet.
Concrete ask: please re-run just `all-connectors-it-5 (8, ubuntu-latest)` on `57890813b` and post the result here. If it comes back green, I'll bucket it with the other testcontainers-level flakes and submit a fresh review against the current head. If it fails again with the same error, let's look at it properly before merging.
<!-- streview-comment:1344 -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Zeta] Close all flow lifecycles even when an earlier close fails [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #12391:
URL: https://github.com/apache/seatunnel/pull/12391#issuecomment-6284910255
Pushed merge commit `2a5e21feb7d` (current `dev` into your branch), @SeaSand1024, to clear the merge conflict. The only conflict was in the import block of `SeaTunnelTask.java` (`AtomicBoolean` from this PR vs `CopyOnWriteArrayList` from `dev`); both imports are kept and no logic line changed. The PR diff against `dev` is otherwise the same as the head I reviewed last (`6ad74f1fb`). The fork CI run on the new head is the verification.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Zeta] Close all flow lifecycles even when an earlier close fails [seatunnel]
Posted by "SeaSand1024 (via GitHub)" <gi...@apache.org>.
SeaSand1024 commented on PR #12391:
URL: https://github.com/apache/seatunnel/pull/12391#issuecomment-5779224557
@DanielLeens @SEZ9 the failed-jobs re-run on head `0fc63dc5` is finished (fork run attempt 3, no new commits): https://github.com/SeaSand1024/seatunnel/actions/runs/35424513689
Unit-test matrix stayed green. `engine-v2-it` and `all-connectors-it-2` are still red on both JDKs.
**engine-v2-it**
- JDK 8: https://github.com/SeaSand1024/seatunnel/actions/runs/35424513689/job/106082736268
`SplitClusterFaultToleranceIT.testStreamJobCancelResolvesWhenWorkerCrashesBeforeCancelAck`
```
ConditionTimeoutException: ... expected: <CANCELED> but was: <FAILED> within 1 minutes.
Caused by: AssertionFailedError: expected: <CANCELED> but was: <FAILED>
```
Same #12353 symptom.
- JDK 11: https://github.com/SeaSand1024/seatunnel/actions/runs/35424513689/job/106082736247
That cancel test did not fail on this leg. Two other tests did:
1. `CheckpointCoordinatorFailoverIT.testStreamJobFailsAfterCheckpointTriggerDispatchFailure` — expected the `CHECKPOINT_INSIDE_ERROR` path, got `CheckpointException: Checkpoint notify complete failed`, caused by `IllegalArgumentException: can't find task group address from taskGroupLocation`.
2. `BackpressureSlowSinkIT.testCheckpointsKeepCompletingUnderSustainedBackpressure` — Awaitility expected `<true>` but was `<false>` within 2 minutes.
**all-connectors-it-2**
- JDK 8: https://github.com/SeaSand1024/seatunnel/actions/runs/35424513689/job/106082736327
- JDK 11: https://github.com/SeaSand1024/seatunnel/actions/runs/35424513689/job/106082736392
Both fail `OpengaussCDCIT.testAddFieldWithRestore` (line 476) with `ConditionTimeoutException` (`actual iterable was <null>`), after `container ... is not running` (HTTP 409). That is a test timeout after the container exits, not an image-pull failure. Same test as #12344, and it does not touch the engine lifecycle code in this PR.
No further commits on this branch. Happy to wait for a committer decision: merge on the green unit-test matrix plus these attributions, or wait for #12311 / #12377.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Zeta] Close all flow lifecycles even when an earlier close fails [seatunnel]
Posted by "SEZ9 (via GitHub)" <gi...@apache.org>.
SEZ9 commented on PR #12391:
URL: https://github.com/apache/seatunnel/pull/12391#issuecomment-5787981851
@SeaSand1024 nothing new from me beyond my last comment, just to keep the next step clear:
- Please sync latest `dev` into this branch and re-run `all-connectors-it-2`. If `OpengaussCDCIT.testAddFieldWithRestore` still fails after the sync, post the job link and we'll triage it fresh rather than assume it's pre-existing.
- The `engine-v2-it` failures on `0fc63dc5` (jobs 106082736268 / 106082736247) stay out of scope here, and as before, please keep the cancel-race fix out of this PR.
Once the `all-connectors-it-2` re-run is in, I'll make the merge call.
<!-- streview-comment:1245 -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Zeta] Close all flow lifecycles even when an earlier close fails [seatunnel]
Posted by "SeaSand1024 (via GitHub)" <gi...@apache.org>.
SeaSand1024 commented on PR #12391:
URL: https://github.com/apache/seatunnel/pull/12391#issuecomment-5739892021
@DanielLeens the non-blocking notes are in on `0fc63dc5`:
- `BlockingWorker` fallback close now catches `Throwable`, so an unchecked close failure still logs "Close task error" and restores the context classloader.
- `SeaTunnelTaskStateTest` covers middle and last failure positions, a second `close()`, an unchecked primary with a checked suppressed exception, an `Error`, teardown order, and the shared-exception case.
- `addSuppressed` skips the same `Throwable` instance, so that case cannot abort the close loop.
No user-facing change.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Zeta] Close all flow lifecycles even when an earlier close fails [seatunnel]
Posted by "SEZ9 (via GitHub)" <gi...@apache.org>.
SEZ9 commented on PR #12391:
URL: https://github.com/apache/seatunnel/pull/12391#issuecomment-5825752145
@SeaSand1024 thanks for syncing `dev` and posting the direct job links — that's exactly the evidence needed here.
Checked on my side:
- The PR diff at `57890813b` is identical to what was reviewed at `0fc63dc5`; the sync (merge `57890813b`) brought in only upstream `dev` commits and touched none of the files this PR changes, so the earlier code review still stands and nothing needs to be re-opened.
- `all-connectors-it-2` in run `35870424836` is green on both `107213895744` (JDK 8) and `107213896064` (JDK 11), and `OpengaussCDCIT.testAddFieldWithRestore` no longer fails there, which is the outcome we expected once the branch picked up the current `dev`.
- Agreed that `engine-v2-it` stays out of scope for this PR — that failure mode is unrelated to your diff and unaffected by the sync.
No remaining asks from me on the previously raised point; the CI gap that was attributable to this branch being behind `dev` is closed. I'll proceed on the green unit-test matrix plus the now-green `all-connectors-it-2`. If anything in CI changes before merge, please drop the run link here as you did this time.
<!-- streview-comment:1296 -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Zeta] Close all flow lifecycles even when an earlier close fails [seatunnel]
Posted by "SEZ9 (via GitHub)" <gi...@apache.org>.
SEZ9 commented on PR #12391:
URL: https://github.com/apache/seatunnel/pull/12391#issuecomment-6050917253
@SeaSand1024 thanks for the follow-ups on `563fd4e8a` and `6ad74f1fb`.
**F3:** dropping the test-thread classloader assert and documenting why in the comment sounds right. I'll verify the end-to-end NCDFE coverage (`testCloseAttemptsEveryCycleWhenCycleThrowsNoClassDefFoundError`), the kept `super.close()` failure test, and `testBlockingWorkerFallbackCloseWhenCallAndCloseThrowRuntimeException` in the diff before resolving. If you can share the name of the `super.close()` failure test, that will speed it up.
Remaining points I'll check against the diff; pointers are welcome but I'll resolve each based on the code and tests rather than on the comment thread:
- **F1 (double close / idempotency):** since `close()` completes the full pass and then rethrows, lifecycles that closed cleanly can be closed again by the BlockingWorker fallback. Does the non-transient `closed` latch short-circuit that second pass, and which test exercises it? If it does not, please explain why the second pass is safe.
- **F2:** the `VirtualMachineError` / `ThreadDeath` early-stop addresses the lifecycle loop. For the fallback, your note says BlockingWorker is an unchanged `catch (Exception)`, whereas F2 was raised because the fallback catches `Throwable` and downgrades a fatal error to a `severe` log line. Those two readings conflict, so I'll re-read the fallback catch in the diff before marking that half resolved; if you believe F2 misread it, point me to the relevant lines.
- **F4:** does the per-lifecycle error log now carry task/lifecycle context so it can be correlated with the `Close task error` line from BlockingWorker?
- **F5:** is `allCycles` still dereferenced unguarded after the `super.close()` catch? If an `init()` failure before `allCycles` is assigned still NPEs in the fallback close path, a null guard plus a small test would close this out.
I'll follow up once I've gone through the diff.
<!-- streview-comment:1586 -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Zeta] Close all flow lifecycles even when an earlier close fails [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #12391:
URL: https://github.com/apache/seatunnel/pull/12391#issuecomment-5846383487
@SeaSand1024 @SEZ9 one correction to my last comment before we call this ready to merge.
I went back through fork run `35870424836` job by job instead of relying on job names alone (it's the same run that confirmed `all-connectors-it-2` green), and the apache-side `Build` check is still reporting `FAILURE` on this head for a reason beyond what we've covered so far. Two more jobs in that same run are red and neither of us had flagged them yet:
- `all-connectors-it-5 (8, ubuntu-latest)`: https://github.com/SeaSand1024/seatunnel/actions/runs/35870424836/job/107213895383 — `OceanBaseCDCCompatibilityIT.testOceanBaseCdcWrapperRuntimeE2e` (2 errors), failing with `ProgramInvocationException: The main method caused an error: Flink job executed failed`.
- `transform-v2-it-part-1 (11, ubuntu-latest)`: https://github.com/SeaSand1024/seatunnel/actions/runs/35870424836/job/107213895413 — `TestFilterRowKindIT.testFilterRowKindMultiTable`, `expected: <0> but was: <1>`.
The second one I can close out the same way we closed the Opengauss job: it's a known, already-filed flake. apache/seatunnel#12116 describes exactly this test failing intermittently only on Flink legs, because `AssertSinkWriter` evaluates static JVM-wide row counters per subtask `close()`; it's already reproduced the same wrong-row-count symptom on two unrelated PRs (#11458, #11077). Nothing in this PR's diff or in the Zeta engine touches `AssertSinkWriter`, so I read this as the same category of pre-existing noise.
The OceanBase one I can't close the same way yet. I didn't find a pre-filed issue for this exact test/symptom, and I only have this one occurrence to go on. Both failing tests run against the Flink translation layer rather than the Zeta engine `SeaTunnelTask.close()` path this PR touches, so mechanically I don't see how this diff could cause either — but "mechanically unrelated" isn't the same as "confirmed pre-existing," so I'd rather not wave it away without another data point. @SeaSand1024, could you re-run just `all-connectors-it-5 (8, ubuntu-latest)` and post the result? Green on a re-run would put it in the same bucket as the other testcontainers-level flakes we already tracked down; a repeat failure with the same error would mean we should look at it properly before merging.
For completeness: `engine-v2-it (8, ubuntu-latest)` in this same run is still `SplitClusterFaultToleranceIT.testStreamJobCancelResolvesWhenWorkerCrashesBeforeCancelAck`, the same #12353/#12311 symptom we've already attributed — nothing new there, just re-confirmed on this exact head.
So: the code side is still ready, and most of the CI picture still stands, but I'd like to hold off on "ready to merge" specifically until the `all-connectors-it-5` re-run is in — one more real data point is worth the short wait.
=== END REPLY ===
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Zeta] Close all flow lifecycles even when an earlier close fails [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #12391:
URL: https://github.com/apache/seatunnel/pull/12391#issuecomment-5852868348
@SEZ9 agreed, and thanks for keeping this current -- we're asking for the same thing, so there's nothing new to add on my side.
To be precise about where things stand as of this reply:
- Code side: unchanged since the diff I reviewed on `0fc63dc5`; the `dev` sync that produced `57890813b` is byte-identical for this PR's three files, so there is no new code-side blocker.
- `transform-v2-it-part-1` -> `TestFilterRowKindIT.testFilterRowKindMultiTable`: I'm treating this the same way you are, as the already-filed #12116 `AssertSinkWriter` static-counter flake on Flink legs. Nothing in this PR's diff touches `AssertSinkWriter`.
- `all-connectors-it-5` -> `OceanBaseCDCCompatibilityIT.testOceanBaseCdcWrapperRuntimeE2e`: still only one occurrence and I could not find a pre-filed issue for this exact symptom, so I'd rather have a second data point than assume it's noise. Mechanically it runs against the Flink translation layer, not the Zeta `SeaTunnelTask.close()` path this PR touches, so I don't see a plausible causal path from this diff, but "mechanically unrelated" isn't the same as "confirmed pre-existing."
Once @SeaSand1024 posts the `all-connectors-it-5` re-run result, I'll fold it into a fresh review comment against `57890813b`: green closes it out as another testcontainers/E2E flake unrelated to this PR, a repeat failure with the same error means we look at it properly before merging. No action needed from either of you beyond that re-run; I'll pick this back up as soon as the result is posted.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Zeta] Close all flow lifecycles even when an earlier close fails [seatunnel]
Posted by "SeaSand1024 (via GitHub)" <gi...@apache.org>.
SeaSand1024 commented on PR #12391:
URL: https://github.com/apache/seatunnel/pull/12391#issuecomment-5932741878
Merged latest `apache/seatunnel` `dev` into `dev-fix-12231-lifecycle-close` (tip `2cc06fc43`) to pick up #12477. No close-path edits; #12353/#12311 not folded in.
Build: https://github.com/SeaSand1024/seatunnel/actions/runs/36852053400
**all-connectors-it-5:** JDK8 **success** https://github.com/SeaSand1024/seatunnel/actions/runs/36852053400/job/110336781920 · JDK11 **success** https://github.com/SeaSand1024/seatunnel/actions/runs/36852053400/job/110336781901
**unit-test:** JDK8 ubuntu/windows success; JDK11 windows success; JDK11 ubuntu failure https://github.com/SeaSand1024/seatunnel/actions/runs/36852053400/job/110336780523
**all-connectors-it-2:** JDK11 success; JDK8 failure https://github.com/SeaSand1024/seatunnel/actions/runs/36852053400/job/110336781393
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Zeta] Close all flow lifecycles even when an earlier close fails [seatunnel]
Posted by "SeaSand1024 (via GitHub)" <gi...@apache.org>.
SeaSand1024 commented on PR #12391:
URL: https://github.com/apache/seatunnel/pull/12391#issuecomment-5749983514
@DanielLeens thanks for confirming #12391 as the path for this issue and for the CI gate note.
Following up on the Build failure on tip `0fc63dc5`:
- Unit-test matrix (JDK 8/11, Ubuntu/Windows) is green on that tip.
- The remaining red jobs are:
- `engine-v2-it`: `SplitClusterFaultToleranceIT.testStreamJobCancelResolvesWhenWorkerCrashesBeforeCancelAck` (expected `CANCELED`, got `FAILED`). Same symptom is tracked in #12353 with an open fix in #12377 (`SubPlan` terminal-state priority on cancel vs worker loss). This tip does not change `SubPlan` / cancel terminal selection.
- `all-connectors-it-2`: `OpengaussCDCIT` (testcontainers infra).
I am re-running the failed Build jobs on the fork now. I will not broaden #12391 with the #12353/#12377 cancel-race fix so this PR stays scoped to the lifecycle-close contract. Happy to follow whatever you prefer if Build stays blocked on that known race after the re-run.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Zeta] Close all flow lifecycles even when an earlier close fails [seatunnel]
Posted by "SEZ9 (via GitHub)" <gi...@apache.org>.
SEZ9 commented on PR #12391:
URL: https://github.com/apache/seatunnel/pull/12391#issuecomment-5964424977
@SeaSand1024 thanks for the CI breakdown on tip `2cc06fc43`. Good to see `all-connectors-it-5` green on both JDKs after the dev sync, and the attempt-2 re-run clearing `unit-test (11, ubuntu-latest)`, `all-connectors-it-2 (8, ubuntu-latest)` and `oracle-cdc-connector-it (8, ubuntu-latest)` — the attribution to the savepoint test, Maven dependency resolution and the wrapper download 404 looks like unrelated flakiness, so nothing there blocks this PR.
Since the sync contained no close-path edits, the earlier review points are still open. What's still needed in `SeaTunnelTask.java`:
1. **F1 – double-close / idempotency:** when a single lifecycle `close()` fails on the normal CLOSED/CANCELLING path, the method still completes the pass and rethrows, so the `BlockingWorker` fallback closes every lifecycle (including the clean ones) again. Please make `close()` idempotent (or track which lifecycles already closed) so the fallback doesn't re-close them.
2. **F2 – `catch (Throwable)` in both teardown loops:** this swallows fatal JVM errors (OOM, ThreadDeath, StackOverflowError) and keeps calling connector `close()` after an OOM, while `BlockingWorker` downgrades the error to a `severe` log. Please narrow to `Exception` (or rethrow `Error`s immediately).
3. **F5 – `super.close()` catch + `allCycles` guard:** the widened `catch (Throwable)` around `super.close()` can only collect an `Error` in practice, and `allCycles` is still dereferenced unguarded right after, so an `init()` failure before `allCycles` is assigned still NPEs on the fallback close path. A null check there would be enough.
4. **F4 – Javadoc + log context:** the Javadoc throws clauses no longer reflect the actual control flow, and the per-lifecycle error log lacks task/lifecycle identifiers, so each failure is logged twice (here and in `BlockingWorker`) with no way to correlate them. Please update the Javadoc and add task id + lifecycle name to the log line.
On the test side (**F3**, `SeaTunnelTaskStateTest.java`): the new tests exercise the loop in isolation but not the two paths this PR actually changes end-to-end — the `super.close()` failure branch and the `BlockingWorker` fallback that now absorbs unchecked close failures. A test for each would let us verify F1/F5 behave as intended.
Once those land I'm happy to take another look. No need to re-run the full CI matrix before then — a green `unit-test` on the follow-up commit is sufficient.
<!-- streview-comment:1479 -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Zeta] Close all flow lifecycles even when an earlier close fails [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #12391:
URL: https://github.com/apache/seatunnel/pull/12391#issuecomment-5787086018
@SeaSand1024 @SEZ9 thanks for the detailed re-run breakdown — this is exactly the kind of evidence that lets us close this out without guessing. I re-checked first: head is still `0fc63dc5`, and the diff against my last review is unchanged (same three files), so nothing below required a fresh code review, just triage of the four red jobs.
Good news first: **`OpengaussCDCIT.testAddFieldWithRestore` (`all-connectors-it-2`, both JDKs) should clear with a `dev` sync.** That failure's real root cause was found and fixed in [#12346](https://github.com/apache/seatunnel/pull/12346) ("Preserve disabled CDC schema behavior"), which merged into `dev` on 2026-09-20 — it's the fix for the exact issue you both were tracking as [#12344](https://github.com/apache/seatunnel/issues/12344). This branch is currently 24 commits behind `dev` (per the compare view), so it predates that fix, which is why your fork re-run still hits it. Unlike the other three jobs below, this one is not "wait for an open PR" — the fix is already on `dev`. @SeaSand1024, could you sync/merge latest `dev` into this branch (no need for a full rebase, just picking up `dev` HEAD is enough) and re-run `all-connectors-it-2`? I'd expect it to go green.
The other three failures are pre-existing `dev`-level flakes, none of them touching the code this PR changes, and none of them fixed yet:
- **`SplitClusterFaultToleranceIT.testStreamJobCancelResolvesWhenWorkerCrashesBeforeCancelAck`** (`engine-v2-it`, JDK 8) — this is the known CANCELED-vs-FAILED race tracked in [#12353](https://github.com/apache/seatunnel/issues/12353). The fix ([#12311](https://github.com/apache/seatunnel/pull/12311)) is still open, not merged, so syncing `dev` won't clear this one — same conclusion as my last comment, just re-confirmed live.
- **`CheckpointCoordinatorFailoverIT.testStreamJobFailsAfterCheckpointTriggerDispatchFailure`** (`engine-v2-it`, JDK 11) — this is a new one for this thread, but it's a known racy fault-injection timing issue in the test itself (the readiness gate it uses can fire before the checkpoint it's supposed to target has actually completed, so the injected fault can land on either checkpoint and surface as different symptoms, including the `taskGroupLocation` lookup failure you saw). A fix for the test's fault-injection ordering is open in [#12288](https://github.com/apache/seatunnel/pull/12288), not yet merged. Nothing in this PR's diff touches `CheckpointCoordinator` or barrier/notify dispatch, so I don't read this as caused by this change.
- **`BackpressureSlowSinkIT.testCheckpointsKeepCompletingUnderSustainedBackpressure`** (`engine-v2-it`, JDK 11) — known checkpoint-lock-starvation flake under sustained backpressure. Fixes are open in [#12316](https://github.com/apache/seatunnel/pull/12316) (engine fix) and [#12313](https://github.com/apache/seatunnel/pull/12313) (test-only, complementary), neither merged yet.
So: sync `dev` and re-run `all-connectors-it-2` — that should turn green. The two `engine-v2-it` (JDK 11 leg gets both `CheckpointCoordinatorFailoverIT` and `BackpressureSlowSinkIT`; JDK 8 gets `SplitClusterFaultToleranceIT`) failures will very likely stay red until #12311, #12288, and #12316/#12313 land, since none of those are in `dev` yet. That's a judgment call for whoever merges this: the code side has been ready since my last review, and all four red jobs are now attributed to specific, tracked, pre-existing issues rather than anything in this diff — a committer could reasonably merge on the green unit-test matrix plus this attribution once the Opengauss job is confirmed green post-sync, without waiting for the other three upstream fixes.
No further code-side asks from me. Thanks again for staying on top of the CI noise instead of folding unrelated fixes in — that made this easy to untangle.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Zeta] Close all flow lifecycles even when an earlier close fails [seatunnel]
Posted by "SeaSand1024 (via GitHub)" <gi...@apache.org>.
SeaSand1024 commented on PR #12391:
URL: https://github.com/apache/seatunnel/pull/12391#issuecomment-5929776826
@DanielLeens @SEZ9 follow-up on the `all-connectors-it-5 (8)` re-run (attempt 2) with the Surefire snippet:
**Result:** still **failure** — https://github.com/SeaSand1024/seatunnel/actions/runs/35870424836/job/110327089414
Same test as before: `OceanBaseCDCCompatibilityIT.testOceanBaseCdcWrapperRuntimeE2e` — 2 errors / 3 runs.
```
[ERROR] testOceanBaseCdcWrapperRuntimeE2e{TestContainer}[1] <<< ERROR!
org.apache.flink.client.program.ProgramInvocationException: The main method caused an error: Flink job executed failed
Caused by: ... CommandExecuteException: Flink job executed failed
Caused by: ... TaskExecuteException: Execute Flink job error
Caused by: org.apache.flink.util.FlinkRuntimeException: Error in serialization.
[ERROR] testOceanBaseCdcWrapperRuntimeE2e{TestContainer}[2] <<< ERROR!
(same ProgramInvocationException / Flink job executed failed)
Test ...testOceanBaseCdcWrapperRuntimeE2e successfully run. # seatunnel-engine / Zeta leg
```
So the repeat failure is on the **Flink** translation legs only; the Zeta/`seatunnel-engine` parameterized leg on this tip is green. That matches the earlier read that this is outside the `SeaTunnelTask.close()` path this PR changes. No new commits. Happy to dig further if you want a tracked issue / comparison against plain `dev`, or to wait for a committer call on merge vs hold.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Zeta] Close all flow lifecycles even when an earlier close fails [seatunnel]
Posted by "SEZ9 (via GitHub)" <gi...@apache.org>.
SEZ9 commented on PR #12391:
URL: https://github.com/apache/seatunnel/pull/12391#issuecomment-5755044336
@SeaSand1024 thanks for the quick turnaround on `0fc63dc5` and for the clear CI breakdown.
On the changes themselves: the `Throwable` catch in the `BlockingWorker` fallback close, the same-instance guard around `addSuppressed`, and the extra `SeaTunnelTaskStateTest` cases (middle/last failure position, repeated `close()`, unchecked primary with checked suppressed, `Error`, teardown order, shared instance) cover exactly the gaps I'd want closed here. Nothing further from me on the code, and I agree with @davidzollo's +1.
On the Build failures, I agree with your read and with keeping #12391 scoped to the lifecycle-close contract rather than pulling in the #12353 / #12377 cancel-race fix. A couple of concrete asks so we can land this cleanly:
1. Once the re-run finishes, please drop a short note here with the result for `engine-v2-it` and `all-connectors-it-2`.
2. If `SplitClusterFaultToleranceIT.testStreamJobCancelResolvesWhenWorkerCrashesBeforeCancelAck` fails again on `0fc63dc5`, please paste the assertion/stack snippet from that run so we can confirm it is the same `CANCELED` vs `FAILED` symptom as #12353 and not something new from this PR. If it matches, I'm fine treating it as a known flaky race; we can either wait for #12377 to land and rebase, or merge on the green unit-test matrix plus a clean re-run of the other IT jobs.
3. If `OpengaussCDCIT` is still red after the re-run, please confirm it's the testcontainers startup issue (e.g. image pull / container start failure) rather than a test assertion, since that job is unrelated to the engine code touched here.
No need to push anything else unless the re-run surfaces something new.
<!-- streview-comment:1212 -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Zeta] Close all flow lifecycles even when an earlier close fails [seatunnel]
Posted by "SEZ9 (via GitHub)" <gi...@apache.org>.
SEZ9 commented on PR #12391:
URL: https://github.com/apache/seatunnel/pull/12391#issuecomment-6029480373
Thanks for the heads-up on the classloader assert — agreed. Since the Awaitility `untilAsserted` block runs on the test thread, it cannot observe the worker thread's context classloader, so it does not actually verify the nested-`finally` restore in `BlockingWorker`. I also agree the production restore is correct as written on `563fd4e8a`, so this is not a merge blocker.
Rather than dropping the assert outright, my preference would be to have the test capture the worker thread's context classloader from inside the close path and assert on it after the worker has finished. If that is awkward with the current test seam, dropping it with a short comment explaining why is fine too. Either way, a follow-up is acceptable — just link it from this thread so it doesn't get lost.
On the rest of your `563fd4e8a` summary: the Error-policy split (full pass for non-fatal Errors, early-stop only for `VirtualMachineError` / `ThreadDeath`, prefer `Error` over earlier `Exception`), the nested `finally` restore, the end-to-end NCDFE coverage plus the retained `super.close()` failure test, and the Javadoc updates all line up with what was asked. The `SplitClusterFaultToleranceIT` cancel-vs-FAILED failure you described on `877056bf1` / run `37097098821` reads as outside the close-path changes here, so I'm fine not folding it into this tip.
Remaining asks from my side: (1) the classloader assert fix or removal as above (this PR or a linked follow-up), and (2) a quick confirmation that the BlockingWorker fallback test still exercises the unchecked-close-failure branch after the Error-policy change, since that was the gap in F3.
<!-- streview-comment:1566 -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Zeta] Close all flow lifecycles even when an earlier close fails [seatunnel]
Posted by "SeaSand1024 (via GitHub)" <gi...@apache.org>.
SeaSand1024 commented on PR #12391:
URL: https://github.com/apache/seatunnel/pull/12391#issuecomment-5945088503
Failed-jobs re-run on tip `2cc06fc43` (Build attempt 2): all three **success**.
Build: https://github.com/SeaSand1024/seatunnel/actions/runs/36852053400
- `unit-test (11, ubuntu-latest)`: **success** — https://github.com/SeaSand1024/seatunnel/actions/runs/36852053400/job/110671848980
- `all-connectors-it-2 (8, ubuntu-latest)`: **success** — https://github.com/SeaSand1024/seatunnel/actions/runs/36852053400/job/110671848862
- `oracle-cdc-connector-it (8, ubuntu-latest)`: **success** — https://github.com/SeaSand1024/seatunnel/actions/runs/36852053400/job/110671849228
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Zeta] Close all flow lifecycles even when an earlier close fails [seatunnel]
Posted by "SeaSand1024 (via GitHub)" <gi...@apache.org>.
SeaSand1024 commented on PR #12391:
URL: https://github.com/apache/seatunnel/pull/12391#issuecomment-6015937897
@DanielLeens @SEZ9 one non-blocking follow-up on item 5: the BlockingWorker classloader assert in `TaskExecutionServiceTest` runs on the test thread (Awaitility `untilAsserted`), so it does not observe the worker thread’s context classloader. Production restore in nested `finally` is still correct. Happy to drop/soften that assert in a follow-up; not treated as a merge blocker.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Zeta] Close all flow lifecycles even when an earlier close fails [seatunnel]
Posted by "SeaSand1024 (via GitHub)" <gi...@apache.org>.
SeaSand1024 commented on PR #12391:
URL: https://github.com/apache/seatunnel/pull/12391#issuecomment-5798766690
Synced latest `dev` into this branch (merge `57890813b`). `all-connectors-it-2` is green on both JDKs:
- https://github.com/SeaSand1024/seatunnel/actions/runs/35870424836/job/107213895744 (JDK 8)
- https://github.com/SeaSand1024/seatunnel/actions/runs/35870424836/job/107213896064 (JDK 11)
`OpengaussCDCIT.testAddFieldWithRestore` is not failing on this run. `engine-v2-it` left out of scope.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Zeta] Close all flow lifecycles even when an earlier close fails [seatunnel]
Posted by "SEZ9 (via GitHub)" <gi...@apache.org>.
SEZ9 commented on PR #12391:
URL: https://github.com/apache/seatunnel/pull/12391#issuecomment-5771308241
@SeaSand1024 thanks for the CI breakdown on `0fc63dc5` and for keeping this PR scoped to the lifecycle-close contract.
Agreed on scope: please do not fold the #12353 / #12377 cancel-race fix into #12391. That touches `SubPlan` terminal-state selection, which is a separate contract from the close-all-flow-lifecycles change here, and mixing them would make both harder to review and revert.
On the code side, the three points from the earlier review (the `Throwable` catch in the `BlockingWorker` fallback close, the added `SeaTunnelTaskStateTest` cases, and the `t != closeException[0]` guard around `addSuppressed`) are resolved between `0663920` and `0fc63dc`, so I don't see a remaining code blocker.
Remaining asks, all CI-related:
- Use "Re-run failed jobs" only for `engine-v2-it` and `all-connectors-it-2`; no additional commits to this branch unless something in the re-run points back at the changed code.
- If `SplitClusterFaultToleranceIT.testStreamJobCancelResolvesWhenWorkerCrashesBeforeCancelAck` (expected `CANCELED`, got `FAILED`) and `OpengaussCDCIT` stay red after the re-run, please paste the new failing job links here so the attribution can be checked against that exact head rather than job names alone.
- Note that neither #12311 nor #12377 is in `dev` yet, so a `dev` sync alone would not clear the cancel-race failure; no need to rebase just for that.
Once the re-run result is posted, we can decide whether to merge on the green unit-test matrix plus the known-flake attribution, or wait for #12311 / #12377 to land first.
<!-- streview-comment:1238 -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Zeta] Close all flow lifecycles even when an earlier close fails [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #12391:
URL: https://github.com/apache/seatunnel/pull/12391#issuecomment-6310075033
Thanks @SEZ9 for going through the current head. I re-read the diff at `2a5e21fe` for each of your questions, so here is what the code shows (this is a merge-only head, the PR content is the same as `6ad74f1f`).
**2. Does the BlockingWorker fallback rethrow an `Error`?** It does not downgrade it to a log line. In `TaskExecutionService.BlockingWorker.run()` the fallback is now `try { tracker.task.close(); } catch (Exception e) { logger.severe("Close task error", e); }` inside an outer `try { ... } finally { setContextClassLoader(oldClassLoader); }`. An `Error` thrown by `close()` is not an `Exception`, so it skips the inner catch, the outer `finally` restores the classloader, and the `Error` then propagates out of `run()` (to the thread's uncaught-exception handling). Only `Exception` subtypes are logged and absorbed. One nuance for the record: because `taskDone(t)` has already been called at that point, such an `Error` is not recorded on the execution tracker, which matches the pre-PR behaviour for the fallback path.
**3a. `closeSuper()` throwing while the lifecycle loop still runs.** `SeaTunnelTaskStateTest#testClosePreservesSuperCloseFailureAndAttachesLifecycleFailuresAsSuppressed` stubs the parent close to fail, then asserts that the parent failure is the primary one and the lifecycle failures are attached as suppressed. `testCloseSkipsLifecycleLoopWhenAllCyclesNull` covers the null case.
**3b. Fallback hitting the already-closed latch.** Here I agree with the gap, and it is the same point as Issue 1 in my last review, which is still open. The latch itself is covered at the `SeaTunnelTask` level by `testCloseIsIdempotentAndClosesEachLifecycleOnlyOnce`. But `TaskExecutionServiceTest#testBlockingWorkerFallbackCloseWhenCallAndCloseThrowRuntimeException` uses `CallAndCloseThrowRuntimeExceptionTask`, which is not a `SeaTunnelTask` and has no latch. The test also asserts only `FAILED` and `closeCalled`, which would still hold if the fallback catch went back to `catch (IOException)` (the `RuntimeException` would escape `run()` after the future has already completed). So it does not currently guard either production edit in `BlockingWorker`. @SeaSand1024, the concrete way to make it discriminate is in my last review: have the test task's `close()` throw an `AssertionError`, record the worker thread, and assert after completion that its context classloader was restored.
**4. Javadoc.** The `close()` Javadoc matches the flow: `@throws IOException` when the primary failure is an `IOException`, unchecked exceptions and `Error`s rethrown unwrapped via `sneakyThrow`, later failures attached as suppressed, `Error` preferred over `Exception`, early stop only for `VirtualMachineError` and `ThreadDeath`. `closeSuper()` has no `@throws IOException` tag even though it declares it, which is a tiny nit.
**5. `allCycles` null guard.** Yes: `close()` now wraps the loop in `if (allCycles != null)`, so a failure in `init()` before `allCycles` is assigned no longer NPEs in the fallback close. It is exercised by `testCloseSkipsLifecycleLoopWhenAllCyclesNull`.
**CI.** Unchanged: the apache-side `Build` for `2a5e21fe` is `action_required` and the fork has no run for this SHA, so this head has not been tested. A fork `Build` run (or a fresh push) is still needed, after which re-running only failed jobs should suffice.
My remaining open items from the last review are Issue 1 (Medium, the BlockingWorker test) and the two Low notes (a `VirtualMachineError` ending up only as suppressed, and `closed` being null for an old-format serialized task). None of them are production correctness problems in the common path.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org