zhangshenghang opened a new pull request, #13729:
URL: https://github.com/apache/seatunnel/pull/13729

   Yes — I am contributing this change to **Apache SeaTunnel**, and I confirm 
it follows the project's contribution conventions (English PR 
title/description, one focused change, formatting and E2E validated locally). 
This is a test-only change: no production code, configuration default, REST/API 
or data format is modified.
   
   ## What this PR does
   
   Adds `CheckpointMinPausePacingIT`, an E2E regression guard for the 
`checkpoint.min-pause` pacing gate that 
`CheckpointCoordinator#tryTriggerPendingCheckpoint` applies to periodic 
checkpoints.
   
   The job runs on an in-JVM Zeta node with a deliberately inverted pacing 
configuration: `checkpoint.interval = 200ms` and the job-level `min-pause = 
2500ms`. The sink is a test-only probe that records the arrival time of every 
checkpoint barrier, so the measurement is the real end-to-end path (coordinator 
gate → barrier dispatch → task → storage), not an internal counter. The test 
waits for six consecutive barrier arrivals and asserts:
   
   - the job stays `RUNNING` and keeps consuming rows while the window is 
measured;
   - checkpoint ids are consecutive, so no admitted checkpoint was lost;
   - each consecutive arrival gap is at least `min-pause` minus a 600ms 
tolerance, i.e. the gate was evaluated against the previous checkpoint's 
completion and re-scheduled the trigger instead of admitting it;
   - the average spacing is also far above the configured interval, so the test 
cannot pass on a scheduler that merely happens to be slow.
   
   ## Why this is a boundary with real regression risk
   
   `checkpoint.min-pause` is the operator-visible write-amplification bound on 
checkpoint storage: it caps how often a pipeline may write a checkpoint 
regardless of how small `checkpoint.interval` is. If a future change hoists, 
drops or mis-anchors that gate (for example compares against the trigger 
timestamp rather than `latestCompletedCheckpoint#getCompletedTimestamp()`), 
nothing fails: every checkpoint still completes, the job still reports 
`RUNNING`, and the retention/overview counters still grow. The only visible 
symptom is a checkpoint storm — roughly 12 checkpoints per second instead of 
one per 2.5 seconds — which no existing E2E detects, because the checkpoint 
tests only assert a lower bound ("at least N checkpoints completed").
   
   Related but complementary coverage: #13703 guards the opposite direction (an 
explicit savepoint must **bypass** the pacing window). This test pins the 
periodic path that must **respect** it.
   
   The fixtures are a plain `FakeSource` and a test-only file sink; no 
transform, SQL, connector or format behavior is exercised.
   
   ## Evidence
   
   - Green on `origin/dev` `0bef81d003`: five consecutive targeted runs, `Tests 
run: 1, Failures: 0, Errors: 0`, ~15.5s per run including job cancel and 
`CANCELED` completion. Observed arrival gaps were 2517ms, 2519ms, 2517ms, 
2525ms, 2516ms for `min-pause = 2500ms`.
   - Negative control: with the `min-pause` branch in 
`CheckpointCoordinator#tryTriggerPendingCheckpoint` disabled (`if (false && 
...)`), the same test fails in 6.5s with `checkpoint 2 was admitted only 201ms 
after checkpoint 1, but checkpoint.min-pause is 2500ms` and observations `[id=1 
at ..., id=2 at +201ms, ...]`. The mutation was reverted and the pristine 
engine reinstalled; the green rerun used `seatunnel-engine-server` jar sha256 
`ea13c9dec606d695c124c90ed2b786e0855b4d91a502ca51285162fafed7d2e8`.
   - `spotless:check` passes.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to