Uh oh!
There was an error while loading. Please reload this page.
fix(asset-parition): add a mutex lock to AssetModel when updating APDR - #59183
Conversation
4c835f4 to
edd36e0Compare95e4053 to
c224bccCompareI 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:
|
386669a to
346eba2CompareLee-W
commented
Dec 9, 2025
Just updated it to lock AssetModel inatead of APDR |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
potiuk
left a comment
There was a problem hiding this comment.
Hmm. took a closer look and I have some improvement proposal and some surprise when looking at the test.
04023ee to
9688202Compare9688202 to
11ba716Compare
potiuk
left a comment
There was a problem hiding this comment.
Much better - htough I think maybe we should run the test few times if it's quick? Lack of the race condition does not say it cannot occur if it's only executed once :)
I did not know SQLite does not support row-level locks. Good solution with extra table.
potiuk
commented
Dec 10, 2025
I think you need to rebase to get rid of the issues that were fixed in main already |
Uh oh!
There was an error while loading. Please reload this page.
5892a87 to
93f84f4Compare67adb42 to
e7d33fbCompareUh oh!
There was an error while loading. Please reload this page.
dstandish
left a comment
There was a problem hiding this comment.
small question but looks ok
e7d33fb to
8c320eeCompare8c320ee to
a418c89CompareUh oh!
There was an error while loading. Please reload this page.
Why
closes: #58919
What
Add a row lock to AssetModel when updating APDR for MySQL and PostgreSQL. Since SQLIte does not support row lock, add retry mechanism if OperationError with
Database is lockedis encountered.^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.