DanielLeens commented on issue #12441:
URL: https://github.com/apache/seatunnel/issues/12441#issuecomment-5794530592

   Classification: A / Zeta savepoint/checkpoint concurrency.
   
   The proposed direction is sound. Current `dev` confirms the root condition: 
`startSavepoint()` sleeps while holding the coordinator lock, while 
`tryTriggerPendingCheckpoint()` must acquire that same lock before it can 
observe the pending-checkpoint state or schedule its next attempt. 
`createPendingCheckpoint(...)` currently has only the 
`tryTriggerPendingCheckpoint` and `startSavepoint` call paths, so this is the 
right boundary to preserve the existing drain exclusion without keeping the 
lock across the sleep.
   
   Please keep the implementation in one focused PR with these constraints:
   
   1. Install one shared savepoint-draining request/future and its gate 
atomically while holding the lock; concurrent `startSavepoint()` calls must 
receive that same future throughout the drain, not race before 
`savepointPendingCheckpoint` exists.
   2. Perform the drain wait outside the lock. Every interrupt, shutdown, 
completed-coordinator, and create failure path must clear the gate under the 
lock and complete that shared future exceptionally, so ordinary triggering 
cannot remain suppressed.
   3. While the gate is set, all non-savepoint calls through 
`tryTriggerPendingCheckpoint()` must follow the existing pending-checkpoint 
behavior: do not create a new pending checkpoint and re-arm rather than drop 
the trigger. Cover general, completed-point, and schema-change checkpoint 
types; this is needed to preserve today's lock-exclusion semantics.
   4. Add deterministic tests for the unlocked drain, no new non-savepoint 
pending checkpoint during the drain, concurrent savepoint coalescing, 
interrupt/shutdown cleanup, and successful resumption of ordinary periodic 
triggering after the gate is cleared.
   
   Please keep #12442's unexpected-trigger-failure policy separate from this 
concurrency change. No assignment or label change is needed.


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