Guosmilesmile commented on PR #15042:
URL: https://github.com/apache/iceberg/pull/15042#issuecomment-3778208053

   Normal scenario
   
   1. `TriggerManagerOperator` first requests a lock from 
`TableMaintenanceCoordinator`. `TableMaintenanceCoordinator` maintains a static 
map; if there is no corresponding lock, it stores the lock and its timestamp, 
then sends an event back to `TriggerManagerOperator`. If the lock is acquired, 
`TriggerManagerOperator` sends a trigger downstream; otherwise, it waits for 
the next attempt.
   2. The trigger propagates downstream. When the watermark advances to 
`LockRemoverOperator`, `LockRemoverOperator` sends a request to 
`TableMaintenanceCoordinator` to release the corresponding lock.
   3. `TableMaintenanceCoordinator` releases the corresponding lock, completing 
one cycle.
   
   State recovery
   
   1. After state recovery, `TriggerManagerOperator` first restores the 
previously stored `TableChange`, and then sends a lock request to 
`TableMaintenanceCoordinator` with the timestamp set to `Long.MaxValue`.
   2. When `TableMaintenanceCoordinator` receives a lock request with timestamp 
`Long.MaxValue`, it overwrites the currently held lock and treats this one as 
the highest priority, then sends a “lock acquired” event back to 
`TriggerManagerOperator`.
   3. After receiving the response, `TriggerManagerOperator` sends 
`Trigger.recovery(current)` downstream.
   4. From this point on, all triggers must wait until the lock is released.
   5. When the watermark advances to `LockRemoverOperator`, it requests 
`TableMaintenanceCoordinator` to release the corresponding lock.
   6. `TableMaintenanceCoordinator` releases the lock, completing the recovery 
flow.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to