You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "201811510411lw (via GitHub)" <gi...@apache.org> on 2026/09/23 02:36:24 UTC
[PR] [Fix][E2E] Stabilize checkpoint trigger dispatch failure test [seatunnel]
201811510411lw opened a new pull request, #12449:
URL: https://github.com/apache/seatunnel/pull/12449
### Purpose of this pull request
`CheckpointCoordinatorFailoverIT.testStreamJobFailsAfterCheckpointTriggerDispatchFailure` can remove the pipeline's slot-profile bookkeeping after a checkpoint barrier has already been dispatched. Completion notifications use the same address lookup, so the job then fails with `CHECKPOINT_NOTIFY_COMPLETE_FAILED` and the test's required `CHECKPOINT_INSIDE_ERROR` assertion fails.
Wait until a checkpoint has been triggered and no checkpoint remains pending, then remove the bookkeeping under the coordinator's existing trigger lock. This lets completion notifications finish and prevents a new trigger from racing the idle check and removal. Keep the strict job-state/error assertion and also verify the missing-address cause and `triggerCheckpoint` stack frame. Correct the explanation of the checkpoint ID counter, whose advancement alone does not establish completion.
This stabilizes the existing regression coverage for #10442 / #10448. The failure was observed in [the Java 8 Engine CI job for #12366](https://github.com/201811510411lw/seatunnel/actions/runs/35552562760/job/106600821473). [Earlier controlled phase experiments](https://github.com/201811510411lw/seatunnel/actions/runs/35502988191) reproduced the same completion-notification assertion failure on both the pre-PR base and PR head. This PR is based independently on `dev` and changes only the E2E test.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Validated on `dev` base `e78be4c7a20fd690388fb7e8cdca064d2aeb0ac7`:
- Java 11.0.31: the focused Maven `clean verify` below passed (1 test, 0 failures/errors/skips), followed by two successful fresh-JVM repetitions of the same method.
- Java 8u202: three successful fresh-JVM repetitions of the same method using the Java 11-built, Java 8-targeted classes and the Failsafe test classpath.
- Repetitions used JUnit Platform Launcher with a `selectMethod` selector for this existing method; they retained all of its assertions. Every run reached the barrier-dispatch failure path.
- Spotless checks and `git diff --check` passed.
Only the named method and its required dependency reactor were validated:
```bash
./mvnw -B -nsu -Pci -pl :connector-seatunnel-e2e-base -am \
-DskipUT=true -DskipIT=false -Dskip.ui=true \
-Dlicense.skipAddThirdParty=true \
'-Dit.test=CheckpointCoordinatorFailoverIT#testStreamJobFailsAfterCheckpointTriggerDispatchFailure' \
-Dfailsafe.failIfNoSpecifiedTests=false -DfailIfNoTests=false clean verify
```
### Check list
- [x] Updated the existing E2E regression test and retained its specific failure-path assertions.
- [x] No new dependencies or JAR packages.
- [x] No user-facing or incompatible changes; documentation and connector registration updates are not applicable.
--
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][E2E] Stabilize checkpoint trigger dispatch failure test [seatunnel]
Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo merged PR #12449:
URL: https://github.com/apache/seatunnel/pull/12449
--
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][E2E] Stabilize checkpoint trigger dispatch failure test [seatunnel]
Posted by "201811510411lw (via GitHub)" <gi...@apache.org>.
201811510411lw commented on PR #12449:
URL: https://github.com/apache/seatunnel/pull/12449#issuecomment-5806107200
Thanks for the review, @DanielLeens! I added a comment explaining the intentional reflective access to `lock` and `pendingCounter` in ae7c8e49a.
--
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][E2E] Stabilize checkpoint trigger dispatch failure test [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #12449:
URL: https://github.com/apache/seatunnel/pull/12449#issuecomment-5846323815
Thanks for putting real numbers behind this — a 40/30/8-run stress comparison across `dev`, this PR, #12288, and #12454 is exactly the kind of evidence that should settle a "did we actually fix the race or just get lucky" question like this one.
Your reading of the locking matches what I traced independently in my last review: `completePendingCheckpoint` only decrements `pendingCounter` after `notifyCompleted` returns, and `tryTriggerPendingCheckpoint` checks/increments it under the same `lock` the test now borrows, so "`pendingCounter == 0` while holding `lock`" really is a sound "no notification in flight, no new trigger sneaking in" signal rather than a coincidence. 0/78 across your three configurations lines up with the 4/4 clean runs I saw in this head's fork CI, so I'm glad to see it hold up under load and on JDK 8 as well, not just on a quiet machine.
On the comparison with #12454: both approaches inject the fault at the same logical point and both came back 0 failures in your run, so I don't see a functional gap between them. This PR's advantage of doing it entirely in test code, with no new hook on `CheckpointCoordinator` itself, is a reasonable tie-breaker if only one is going to land — though which of the two (or whether both add value for different reasons) is ultimately a call for whoever coordinates the overlapping PRs here, not something I want to unilaterally decide in a comment thread.
One general note since #12288 came up in your table too: between "close the race so the test deterministically hits the intended path" (this PR's approach) and "widen the assertion to accept either outcome," I'd lean toward the former on principle — it protects the actual regression this test exists for (#10442/#10448), which stops being true if the test can pass having caught the wrong failure. Your numbers for #12288 (still failing 2/40, 5/30, 1/8) seem consistent with that: accepting either reason doesn't remove the underlying nondeterminism, it just stops the test from complaining about it.
No change to my conclusion — still Ready to merge / Stable on this PR. Thanks again for the extra rigor here.
--
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][E2E] Stabilize checkpoint trigger dispatch failure test [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #12449:
URL: https://github.com/apache/seatunnel/pull/12449#issuecomment-5812738750
Thanks for adding that so quickly! I re-reviewed the latest head (`cdeb970816f`) end to end, not just the diff since my last pass, and confirmed both new commits (`ae7c8e49a9e` documenting the reflective access, and `cdeb970816f` re-wrapping that comment for the Java 8 line-length check) are comment-only, don't touch any assertion or synchronization logic, and don't change the runtime behavior I already verified. `CheckpointCoordinatorFailoverIT` (all 4 tests) passed cleanly on this exact head in both the Java 8 and Java 11 `engine-v2-it` lanes.
Posted a fresh full re-review below (required by our process whenever the head commit changes after an approval) — same conclusion as before: ready to 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][E2E] Stabilize checkpoint trigger dispatch failure test [seatunnel]
Posted by "goutamadwant (via GitHub)" <gi...@apache.org>.
goutamadwant commented on PR #12449:
URL: https://github.com/apache/seatunnel/pull/12449#issuecomment-5841261576
I ran `CheckpointCoordinatorFailoverIT#testStreamJobFailsAfterCheckpointTriggerDispatchFailure` in a loop locally. I compared `dev`, this PR, #12288, and the matching part of #12454.
Setup: macOS, 10 cores, one fresh JVM per run. JDK 11 runs used `-XX:ActiveProcessorCount=2`. Base was `dev` at `deb16a3c3`. Each head was the PR diff applied to that commit.
| variant | JDK 11, loaded host | JDK 11 + 6 CPU burners | JDK 8 |
|---|---|---|---|
| `dev` | 3 / 40 | 7 / 30 | 0 / 8 |
| this PR | 0 / 40 | 0 / 30 | 0 / 8 |
| #12288 | 2 / 40 | 5 / 30 | 1 / 8 |
| #12454 | 0 / 40 | 0 / 30 | 0 / 8 |
All failures on `dev` and #12288 are the CI one: `Checkpoint notify complete failed` instead of `CHECKPOINT_INSIDE_ERROR`. That means the entry was removed while a completion notification was still in flight.
Reading the code, the fix holds. `completePendingCheckpoint` decrements `pendingCounter` only after `notifyCompleted` returns. `tryTriggerPendingCheckpoint` checks and increments it under the same `lock`. So "counter is 0 under the lock" is a real between-checkpoints point. The two new assertions also make the test stricter, not looser.
This PR and #12454 inject the fault at the same point. #12454 does it through a `@VisibleForTesting` method on `CheckpointCoordinator`; this PR uses reflection in the test only. Both were 0 failures here. Landing one and dropping the other seems best; this one has the advantage of not touching engine code.
--
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