Closed xingyunauthor closed 3 years ago
I changed the code to private static ConcurrentDictionary<RedisKey, RedisKey> HeldLocks => new ConcurrentDictionary<RedisKey, RedisKey>();
20 days ago, maybe solved this problem, and now not show this bug again
System.InvalidOperationException: Operations that change non-concurrent collections must have exclusive access. A concurrent update was performed on this collection and corrupted its state. The collection's state is no longer correct. at System.Collections.Generic.HashSet`1.Contains(T item) at Hangfire.Redis.RedisLock.Acquire(IDatabase redis, RedisKey key, TimeSpan timeOut, TimeSpan holdDuration) at Hangfire.Redis.RedisLock.Acquire(IDatabase redis, RedisKey key, TimeSpan timeOut) at Hangfire.Redis.RedisConnection.AcquireDistributedLock(String resource, TimeSpan timeout) at Hangfire.RecurringJobExtensions.AcquireDistributedRecurringJobLock(IStorageConnection connection, String recurringJobId, TimeSpan timeout) at Hangfire.Server.RecurringJobScheduler.EnqueueBackgroundJob(BackgroundProcessContext context, IStorageConnection connection, String recurringJobId, DateTime now) at Hangfire.Server.RecurringJobScheduler.TryEnqueueBackgroundJob(BackgroundProcessContext context, IStorageConnection connection, String recurringJobId, DateTime now)