with_advisory_lock icon indicating copy to clipboard operation
with_advisory_lock copied to clipboard

Advisory locking for ActiveRecord

Results 27 with_advisory_lock issues
Sort by recently updated
recently updated
newest added

Let see if jruby support the new rails versions.

This PR will release version 6.0. This will be the last release with activerecord 6.1 support The next version 7.0 will drop support to sqlite3 and fix the multi database...

The private method included in ActiveRecord has a very generic name and can easily conflict. Is it possible to give it a more specific name? ActiveRecord::Base.send(:impl_class) #=> WithAdvisoryLock::PostgreSQL

:robot: I have created a release *beep* *boop* --- ## [5.2.0](https://github.com/ClosureTree/with_advisory_lock/compare/with_advisory_lock/v5.1.0...with_advisory_lock/v5.2.0) (2024-02-12) ### Features * use current connnection instead of the one in ActiveRecord::Base ([#90](https://github.com/ClosureTree/with_advisory_lock/issues/90)) ([c28a172](https://github.com/ClosureTree/with_advisory_lock/commit/c28a172a5a64594448b6090501fc0b8cbace06f6)) ### Bug Fixes *...

autorelease: pending

…hould be used instead of ActiveRecord::Base.connection

At the moment, the gem generates lock id automatically based on the given string. The resulting lock id is hidden as an implementation detail. However, it would be useful to...

This is regarding issue #80 - Added support for built-in wait and timeout functionality if the database engine supports it. - Unfortunately, PostgreSQL doesn't provide a function to wait for...

Why do you use `pg_try_advisory_lock` and not just simple `pg_advisory_lock` which will avoid polling in SQL? You can plan with this example: ```ruby def with_advisory_lock(lock_id) execute("SELECT pg_advisory_lock(#{lock_id})") yield ensure execute("SELECT...

In multithreaded environment, e.g. 80 sidekiq parallel jobs (in our case), `advisory_lock_exists?` actually is mostly guaranteed to create many *false positive locks* in postgres. Most probably because 1st thread acquires...