potiuk commented on issue #58919: URL: https://github.com/apache/airflow/issues/58919#issuecomment-3639423150
> [@potiuk](https://github.com/potiuk) another option is to make another dedicated lock table like an "apdr_mutex" table which would control only the creation of new APDR records. this would have the same effect as locking asset, but it would not interfere with other things updating that asset. > > but, maybe we just leave this in our back pocket and go there only if we see issues with locking the asset. This is what @Lee-W has done in his PR for sqlite where row lock is not supported https://github.com/apache/airflow/pull/59183/changes#r2608538775 . and locking is based on inserting row with primary key to the log (temporarily - without committing it - and deleting it before transaction is committed). The problem with that is that it needs an active loop + sleep() rather than SELECT FOR UPDATE that will just wait for the lock to be relased. So I am afraid it might be less efficient than pur FOR UPDATE lock on existing row. I also have think we do not need it in sqlite at all - in WAL mode of sqlite there is only wone writer at th same time allowed, but that's a different story. -- 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]
