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
The current implementation of the PostgreSqlDistributedLock throw a custom exception PostgreSqlDistributedLockException when the resource can't be locked before the timeout.
Short story, we use the public API AcquireDistributedLock in a custom filter to "debounce" multiple jobs that reference the same key, i recently migrate from sql server to postgre sql and i detect a regression in this part of my system.
But we have detect another side effect of the current implementation in the internal use of AcquireDistributedLock in the Hangfire.Core. The DelayedJobScheduler catch the normed DistributedLockTimeoutException to retry automaticly if the resource 'hangfire:lock:schedulepoller' can't be lock before the timeout, with the current implementation of postgre provider this part falls in error.
For moment i used this versions in my production code but the problem keep present with last version of this two projects.
Hangfire.Core : 1.7.36
Hangire.PostGre : 1.19.3
Solution :
I propose to rework PostgreSqlDistributedLock to throw DistributedLockTimeoutException when the resource can't be lock before timeout and continue to throw PostgreSqlDistributedLock for other error.
The text was updated successfully, but these errors were encountered:
Hey,
The current implementation of the
PostgreSqlDistributedLock
throw a custom exceptionPostgreSqlDistributedLockException
when the resource can't be locked before the timeout.Short story, we use the public API
AcquireDistributedLock
in a custom filter to "debounce" multiple jobs that reference the same key, i recently migrate from sql server to postgre sql and i detect a regression in this part of my system.But we have detect another side effect of the current implementation in the internal use of
AcquireDistributedLock
in the Hangfire.Core. The DelayedJobScheduler catch the normedDistributedLockTimeoutException
to retry automaticly if the resource'hangfire:lock:schedulepoller'
can't be lock before the timeout, with the current implementation of postgre provider this part falls in error.For moment i used this versions in my production code but the problem keep present with last version of this two projects.
Hangfire.Core : 1.7.36
Hangire.PostGre : 1.19.3
Solution :
I propose to rework PostgreSqlDistributedLock to throw
DistributedLockTimeoutException
when the resource can't be lock before timeout and continue to throwPostgreSqlDistributedLock
for other error.The text was updated successfully, but these errors were encountered: