potiuk commented on PR #59183:
URL: https://github.com/apache/airflow/pull/59183#issuecomment-3629434128

   I don't think it's a good solution
   
   SELECT FOR UPDATE will not lock anything when ADPR lock is missing. 
   
   If the task switch  happens after ROW lock in first event handling, both 
select for updates will run and return no row, and this will create both ADPRs:
   
   
   | Time | Event 1                              | Event 2                      
        |
   
|------|--------------------------------------|--------------------------------------|
   | 0    | SELECT FOR UPDATE ADR (NO ROW FOUND) |                              
        |
   | 1    |                                      | SELECT FOR UPDATE ADR (NO 
ROW FOUND) |
   | 2    |                                      | CREATE ADR                   
        |
   | 3    | CREATE ADR                           |                              
        |
   
   
   
   


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