imranmomin / Hangfire.AzureCosmosDb

Azure Cosmos DB storage provider for Hangfire
https://www.hangfire.io/
MIT License
18 stars 17 forks source link

Random corruptions causing scheduler to fail #33

Closed dioptre closed 2 years ago

dioptre commented 2 years ago

I see this in the logs, and now find that schedules are failing indeterminately.

Error:
System.Collections.Generic.KeyNotFoundException: The given key 'Cron' was not present in the dictionary.
   at Hangfire.Storage.StorageConnectionExtensions.GetRecurringJobDtos(IStorageConnection connection, IEnumerable`1 ids)
   at Hangfire.Storage.StorageConnectionExtensions.GetRecurringJobs(IStorageConnection connection, IEnumerable`1 ids)
imranmomin commented 2 years ago

@dioptre - have been working on the fix. Will soon do a release.

If you can pull /patch_api_update branch and test locally.

Note - this will not solve the existing corruption. Likely you will have to recreate a new database/container