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

   Thanks @SEZ9 and @DanielLeens. I pushed two commits on top of `1afaaab62`, 
keeping your item order.
   
   **Trigger hand-off (blocker)**, fixed in `f2ba9a9ff`. The `thenAcceptAsync` 
stage in `startTriggerPendingCheckpoint` is now observed. If it fails, whether 
the coordinator executor rejected the hop or an earlier stage building the 
`PendingCheckpoint` failed, `failTriggerGeneration` fails the generation that 
started the checkpoint. It uses the same `generationLock` fence as the expiry, 
so it cannot fail a generation that a restore put in its place, and a failure 
an earlier stage already reported finds the generation done and is dropped. The 
handling is scheduled on the lease rather than run inline: a hop on an already 
complete future is rejected on the registering thread, which holds `lock`, and 
the fence takes `generationLock` before `lock`, so running it inline would 
invert the lock order. `pendingCounter` is now raised before the hop is 
registered, so cleanup of that failure cannot be undone by a late increment. 
The new `CheckpointCoordinatorTest#testRejectedTriggerHandOffFailsTh
 eOwningGeneration` uses an executor that is already shut down, then asserts 
the generation completes FAILED, `handleCheckpointError(1, false)` is called, 
and `pendingCounter` is back to 0. With the fix reverted it times out waiting 
for the generation.
   
   **Javadoc and description wording**: `SharedCheckpointScheduler` now says 
the timers are not scheduled on the coordinator executor, that work a timer 
starts can still hop to it, and that the coordinator handles a rejected hop. 
The PR description says the same and has a new "Trigger hand-off" section.
   
   **`scheduler` field and closed-lease `schedule()`**, in `eecf96471`: the 
field is `volatile`, and a closed lease now logs at INFO with the job and 
pipeline id when it refuses a late task.
   
   **Failover wording**: section 5 of the description is now "Reset closes the 
lease and takes a fresh one", with the diagram redrawn to match 
`cleanPendingCheckpoint`.
   
   **`cancelAll()`**: it is package-private now and only `close()` and the 
scheduler tests call it. I dropped the trailing `outstanding.clear()`, because 
cancelling a task already removes it from the set, so the clear only risked 
dropping a task that was scheduled concurrently. The Javadoc states that 
contract.
   
   **`getTimerPoolSize()`**: package-private, matching 
`getDispatcherPoolSize()`.
   
   **Failover IT**: besides `isShutdown()`, it now asserts that the recovered 
coordinator's lease has no outstanding tasks after cancel. I did not add a 
generation check in the IT; the generation fencing is covered by the unit tests 
above and the existing expiry ones.
   
   All 74 tests in the engine-server `checkpoint` package pass locally on JDK 
17 (2 skipped are the existing `@Disabled`). I still can't compile the e2e 
module locally, so the fork Build is the first compile of the IT change. I'll 
post its result 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: [email protected]

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

Reply via email to