Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't use single global app lock resource #984

Open
Charles-Gagnon opened this issue Dec 5, 2023 · 0 comments
Open

Don't use single global app lock resource #984

Charles-Gagnon opened this issue Dec 5, 2023 · 0 comments
Labels
enhancement New feature or request P1 trigger
Milestone

Comments

@Charles-Gagnon
Copy link
Contributor

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.

@Charles-Gagnon Charles-Gagnon added enhancement New feature or request trigger labels Dec 5, 2023
@Charles-Gagnon Charles-Gagnon added this to the Post GA milestone Dec 5, 2023
@MaddyDev MaddyDev added the P1 label Jan 31, 2024
@JetterMcTedder JetterMcTedder added NRC and removed NRC labels Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P1 trigger
Projects
None yet
Development

No branches or pull requests

3 participants