You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "davidzollo (via GitHub)" <gi...@apache.org> on 2026/02/28 04:12:10 UTC

[I] [Docs][Core] Add Javadoc to CheckpointCoordinator (checkpoint state machine) [seatunnel]

davidzollo opened a new issue, #10545:
URL: https://github.com/apache/seatunnel/issues/10545

   Sub-issue of #10533
   
   ## Scope
   
   `CheckpointCoordinator` implements Zeta's distributed checkpoint protocol: barrier injection, task ACK collection, state persistence, and restore. At 1 174 lines it has only ~21 Javadoc lines (~1.8 % coverage). The state machine and field semantics are entirely undocumented.
   
   ## File
   
   `seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/checkpoint/CheckpointCoordinator.java`
   
   ## Methods to document
   
   | Method | Line | What to explain |
   |--------|------|-----------------|
   | `reportedTask(TaskReportStatusOperation)` | 256 | Entry point for task status reports; maps `WAITING_RESTORE` → `restoreTaskState`, `READY_START` → `allTaskReady` |
   | `restoreTaskState(TaskLocation)` | 306 | Looks up latest `CompletedCheckpoint`; distributes per-action states to the target task; parallelism remapping; `COORDINATOR_INDEX` special case for enumerator state |
   | `allTaskReady()` | 346 | Called once all tasks report `READY_START`; triggers first checkpoint cycle or immediately completes if no checkpoint is needed |
   | `tryTriggerPendingCheckpoint(CheckpointType)` | 500 | Enforces minimum checkpoint interval; guards against concurrent pending checkpoints; schedules barrier injection |
   | `acknowledgeTask(TaskAcknowledgeOperation)` | 905 | Accumulates per-task ACKs inside the `PendingCheckpoint`; calls `completePendingCheckpoint` when all tasks have ACKed |
   | `completePendingCheckpoint(CompletedCheckpoint)` | 942 | Persists checkpoint to storage; updates `runningJobStateIMap`; notifies all tasks; prunes oldest checkpoint from history |
   | `cleanPendingCheckpoint(CheckpointCloseReason)` | 853 | Abort path: maps close reason to failure vs cancel; clears all pending checkpoints |
   | `readyToClose(TaskLocation)` | 424 | Tracks source-complete signals; once all sources are ready-to-close, triggers final savepoint barrier |
   | `notifyTaskStart()` | 397 | Broadcasts task-start event to all pipeline tasks; part of startup sequencing |
   | `scheduleSchemaChangeBeforeCheckpoint()` | 1111 | Initiates the DDL-before-checkpoint phase of the schema-evolution protocol |
   
   ## Fields to document (add field-level Javadoc)
   
   | Field | Line | What to explain |
   |-------|------|-----------------|
   | `readyToCloseStartingTask` | 119 | Source tasks that have finished emitting data and are waiting for the final barrier |
   | `readyToCloseIdleTask` | 120 | Source tasks currently in idle (no-data) state awaiting close |
   | `closedIdleTask` | 121 | Idle tasks that have fully closed; used to gate coordinator completion |
   | `schemaChanging` | 136 | Guards normal checkpoint triggers during an in-progress DDL schema-change event |
   | `isAllTaskReady` | 143 | Set to `true` once; prevents duplicate `allTaskReady` calls on subsequent checkpoint cycles |
   
   ## How to contribute
   
   1. Fork the repo and create a branch
   2. Add Javadoc to the methods and fields above
   3. Run `./mvnw spotless:apply` and `./mvnw -q -DskipTests verify`
   4. Open a PR with title: `[Docs][Core] Add Javadoc to CheckpointCoordinator`


-- 
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.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Docs][Core] Add Javadoc to CheckpointCoordinator (checkpoint state machine) [seatunnel]

Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo commented on issue #10545:
URL: https://github.com/apache/seatunnel/issues/10545#issuecomment-6376360183

   Closing this issue as completed after rechecking the original report and its resolution.
   
   The requested `CheckpointCoordinator` lifecycle and state-machine Javadoc has been added, covering task readiness, checkpoint triggering, schema checkpoints and completion.
   
   Resolution evidence:
   
   - [PR #10555](https://github.com/apache/seatunnel/pull/10555), merged into `dev` on 2026-06-05 ([merge commit `013ce82558cc`](https://github.com/apache/seatunnel/commit/013ce82558cc5f4747ba900750adc616a5cf6040)).
   
   The corresponding implementation remains present in [`dev` at `14a27ac26a0a`](https://github.com/apache/seatunnel/commit/14a27ac26a0a71b56722f86cdf8ec2779094ceaf).
   
   <!-- seatunnel-closure-audit:20261023:10545 -->


-- 
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: [I] [Docs][Core] Add Javadoc to CheckpointCoordinator (checkpoint state machine) [seatunnel]

Posted by "DanielCarter-stack (via GitHub)" <gi...@apache.org>.
DanielCarter-stack commented on issue #10545:
URL: https://github.com/apache/seatunnel/issues/10545#issuecomment-3976711740

   <!-- code-pr-reviewer -->
   Thank you for the detailed documentation improvement proposal for `CheckpointCoordinator`. 
   
   I've verified that the file exists at `seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/checkpoint/CheckpointCoordinator.java` (1174 lines) and confirmed the Javadoc coverage is indeed very low (~2%), matching your description.
   
   All 10 methods and 5 fields listed in the issue exist and lack Javadoc. The line numbers are accurate (with minor offsets due to code evolution, which is normal). The related classes like `CheckpointType`, `CheckpointCloseReason`, `CheckpointCoordinatorStatus`, and `CheckpointPlan` (with `COORDINATOR_INDEX = -1`) are also present.
   
   **Key documentation areas to cover:**
   - State machine transitions: `WAITING_RESTORE` → `restoreTaskState()` → `READY_START` → `allTaskReady()` → `tryTriggerPendingCheckpoint()` → `acknowledgeTask()` → `completePendingCheckpoint()`
   - Field semantics: `readyToCloseStartingTask`/`readyToCloseIdleTask`/`closedIdleTask` (task lifecycle), `schemaChanging` (gate for DDL), `isAllTaskReady` (one-time gate)
   - Parallelism remapping logic in `restoreTaskState()` (lines 313-339)
   
   You can reference `docs/en/architecture/fault-tolerance/checkpoint-mechanism.md` (lines 125-150) for architecture context and existing enum classes for Javadoc style.
   
   This is a well-scoped, valuable improvement for #10533. Contributors should run `./mvnw spotless:apply` and `./mvnw -q -DskipTests verify` after changes.


-- 
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: [I] [Docs][Core] Add Javadoc to CheckpointCoordinator (checkpoint state machine) [seatunnel]

Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on issue #10545:
URL: https://github.com/apache/seatunnel/issues/10545#issuecomment-4227773925

   Thanks for opening this documentation task. I checked the current `dev` state, and this issue already has a corresponding PR: #10555 (`[Improve][Checkpoint] Add Javadoc for CheckpointCoordinator lifecycle`).
   
   The scope in the issue is still the right scope, and I do not think we need more issue-side discussion before moving forward.
   
   The best next step is just to review that PR against the lifecycle / state-machine methods listed here and make sure the Javadocs explain restore, trigger, ACK, and completion boundaries clearly.
   
   Thanks again for organizing these checkpoint documentation items.


-- 
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: [I] [Docs][Core] Add Javadoc to CheckpointCoordinator (checkpoint state machine) [seatunnel]

Posted by "dybyte (via GitHub)" <gi...@apache.org>.
dybyte commented on issue #10545:
URL: https://github.com/apache/seatunnel/issues/10545#issuecomment-4052769654

   Linking the corresponding PR here: #10555 


-- 
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: [I] [Docs][Core] Add Javadoc to CheckpointCoordinator (checkpoint state machine) [seatunnel]

Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo closed issue #10545: [Docs][Core] Add Javadoc to CheckpointCoordinator (checkpoint state machine)
URL: https://github.com/apache/seatunnel/issues/10545


-- 
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