Vivek1106-04 commented on PR #12165:
URL: https://github.com/apache/seatunnel/pull/12165#issuecomment-7165823252

   #12149 (merged yesterday) conflicted with this PR, and not only textually, 
so this sync carries one new commit that needs a look.
   
   #12149 makes non-reset cleanup leave the coordinator's 
`ScheduledExecutorService` shut down, recreating it only on 
`CHECKPOINT_COORDINATOR_RESET`, so a late callback cannot start a thread after 
the pipeline ends. Here the coordinator holds a `PipelineCheckpointScheduler` 
lease instead, and cleanup only called `cancelAll()`, which leaves the lease 
usable. #12149's two coordinator tests and its 
`CheckpointCoordinatorFailoverIT` assertion also read the `scheduler` field as 
a `ScheduledExecutorService`, which would fail the cast.
   
   The merge commit `ad48aaaf7` is a plain resolution: it keeps this PR's code 
plus dev's comment wording and drops dev's `createScheduler()`. The port is a 
separate commit, `1afaaab62`. It adds `PipelineCheckpointScheduler.close()`, 
which cancels the lease's outstanding tasks and makes any later `schedule` 
return an already cancelled future; `schedule` re-checks the flag after 
registering the task, so a racing `close()` cannot miss it, and other 
pipelines' leases and the shared threads are untouched. 
`cleanPendingCheckpoint` now closes the lease and, on RESET, takes a fresh one 
from the manager, which is the lease equivalent of #12149's `shutdownNow()` 
plus recreate-on-RESET.
   
   On the test side, #12149's `testCancelDoesNotRecreateScheduler` and 
`testResetRecreatesLiveScheduler` now read the field as the lease and are 
otherwise unchanged, and the IT asserts that the recovered coordinator's lease 
is closed after cancel. I dropped the IT's `isTerminated()` check because a 
lease owns no threads of its own. There is also a new 
`SharedCheckpointSchedulerTest#testClosedLeaseRefusesLateTasks`.
   
   All 73 tests in the engine-server `checkpoint` package pass locally on JDK 
17. I could not compile the e2e IT module locally, so the fork Build ([run 
45637714319](https://github.com/Vivek1106-04/seatunnel/actions/runs/45637714319))
 is its first compile; I'll post the result when it finishes.
   


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