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
I've been using the gem with_advisory_lock quite a bit recently in a ruby codebase. The locks are not connected to any table or row and work ok for certain needs in an application.. Maybe we can do something with this in Avram?
Note: I believe rails has some advisory lock functionality built in, but the gem implements polling logic to avoid hanging up the thread for too long. I'm not sure what else it does or if we'd need to consider that. It also has built in config to disable the query cache because updates could happen to the database while waiting for the lock.
It would be really nice to wrap running migrations in an advisory lock. Rails does this and it prevents a cluster crash when spinning up multiple instances after a deploy that contains migrations.
I've been using the gem with_advisory_lock quite a bit recently in a ruby codebase. The locks are not connected to any table or row and work ok for certain needs in an application.. Maybe we can do something with this in Avram?
Note: I believe rails has some advisory lock functionality built in, but the gem implements polling logic to avoid hanging up the thread for too long. I'm not sure what else it does or if we'd need to consider that. It also has built in config to disable the query cache because updates could happen to the database while waiting for the lock.
https://www.postgresql.org/docs/current/explicit-locking.html#ADVISORY-LOCKS
The text was updated successfully, but these errors were encountered: