zhangshenghang opened a new pull request, #13663:
URL: https://github.com/apache/seatunnel/pull/13663
Yes — I confirm that this change is contributed to Apache SeaTunnel, and I
acknowledge the project's contribution and review guidelines.
### Purpose of this PR
Add a Zeta engine E2E that guards **per-pipeline checkpoint retention and
checkpoint identity on a multi-pipeline job**. This is a test-only change; no
production code is modified.
A Zeta job can own several pipelines that share one job id but keep
independent checkpoint id sequences, storage namespaces and `max-retained`
budgets. A job-scoped counter, a job-scoped delete path, or a shared retention
queue would silently corrupt or delete a sibling pipeline's only recovery
points, yet existing engine coverage only checkpoints a single pipeline
(`CheckpointStorageRetentionPruneTest`, `CheckpointStorageWriteFailureIT`,
`CheckpointRestoreWithStopIT`, cancellation/retention ITs).
### What the E2E does
`MultiPipelineCheckpointRetentionIT` runs one `STREAMING` job with two
concurrent `FakeSource -> Console` pipelines in a single Zeta node (fixed
slots, `dynamic-slot=false`, `slot-num=6`), configures `max-retained = 2`, and
installs a recording `LocalFileStorage` plugin (`RetentionTrackingStorage`)
that keeps the ids each pipeline actually persisted and every delete request
the coordinator issues.
While both pipelines checkpoint every 500 ms, the test asserts:
1. Each pipeline's stored checkpoint ids start at 1 and stay gap-free, so
one pipeline's checkpointing can never consume or skip another pipeline's ids.
2. Every retention delete request contains only ids that the **same**
pipeline had already stored successfully, and each request deletes exactly one
`max-retained` block (2 ids).
3. Each pipeline always keeps a contiguous range of 2..4 readable checkpoint
files — never below the configured budget and never more than one in-flight
rotation block — and the latest completed checkpoint stays readable with a
non-empty state payload.
4. Rotating one pipeline's old checkpoints never removes the sibling
pipeline's latest checkpoint/storage entry.
5. Cancelling the job still deletes the checkpoint data of both pipelines
and requests the job-level cleanup.
The fixture lives in `org.apache.seatunnel.engine.e2e.retention`; the job
config is
`multi-pipeline-retention/stream_two_pipelines_to_console_checkpoint_retention.conf`.
Sources and sinks are only fixtures (FakeSource/Console), per the intended
scope: the contract under test is engine checkpoint scheduling, retention and
recovery-point ownership.
### Verification
- Four consecutive green runs on `dev` (`0bef81d003`): 8.367 s, 8.127 s,
8.143 s, 8.288 s; the last runs include `spotless:check` (exit 0).
- Negative control: changing the retention loop in
`CheckpointCoordinator#completePendingCheckpoint` to delete `2 * max-retained`
ids (an over-pruning regression) makes the E2E fail in 7.9 s at `retention must
delete exactly one configured block at a time: DeleteRequest{pipelineId=1,
checkpointIds=[1, 2, 3, 4]}`.
- The mutation was reverted, the pristine `seatunnel-engine-server` jar
rebuilt and reinstalled (SHA-256
`ea13c9dec606d695c124c90ed2b786e0855b4d91a502ca51285162fafed7d2e8`), and the
green run above repeated.
No issue is filed: the contract holds on current `dev`, so this PR is a
regression guard only.
--
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]