You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we use a single app lock resource for an entire DB - _az_func_Trigger. This is ok for small apps that don't have scaling, but if you have a number of functions on the same database and those start being scaled out we can quickly start hitting timeouts since every transaction is processed serially by use of this lock.
The lock is still needed to prevent deadlocks, but it should be able to be scoped down to at least the table + function ID level (like we do for the leases tables) since each function should only be querying rows that are associated with that specific table + function from the global state tables (where the shared state is)
Care will need to be made to ensure that we don't scope it down too much though - for example if it's table + function ID but we have multiple functions all watching the same table then we should still ensure that they won't deadlock on themselves.
The text was updated successfully, but these errors were encountered:
Currently we use a single app lock resource for an entire DB -
_az_func_Trigger
. This is ok for small apps that don't have scaling, but if you have a number of functions on the same database and those start being scaled out we can quickly start hitting timeouts since every transaction is processed serially by use of this lock.The lock is still needed to prevent deadlocks, but it should be able to be scoped down to at least the table + function ID level (like we do for the leases tables) since each function should only be querying rows that are associated with that specific table + function from the global state tables (where the shared state is)
Care will need to be made to ensure that we don't scope it down too much though - for example if it's table + function ID but we have multiple functions all watching the same table then we should still ensure that they won't deadlock on themselves.
The text was updated successfully, but these errors were encountered: