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
"Quartz.JobPersistenceException: Unable to add lock instance for lock TriggerAccess on NON_CLUSTERED\n ---> System.Exception: Unable to add lock instance for lock TriggerAccess on NON_CLUSTERED\n at Quartz.Spi.MongoDbJobStore.LockManager.AddLock(LockInstance lockInstance).
This exception is not consistent.
The text was updated successfully, but these errors were encountered:
Hi, Thanks for the reply, had figured out the issue and fixed.
Current Implementation: The AcquireLock method is designed to return a LockInstance object upon successful lock acquisition. If the attempt fails, the method retries every second. During this process, an entry with a 30-second TTL is created in the lock repository (MongoDB/CosmosDB), and a corresponding entry is added to a concurrent dictionary, keyed by Access Type and Instance ID. The lock is intended to be released upon disposal of the LockInstance object, removing entries from both the lock repository and the concurrent dictionary.
RCA (Root Cause Analysis): If an operation exceeds the 30-second threshold due to network latency or high load, the TTL mechanism will remove the database entry. This allows another instance—or potentially the same instance—to proceed with the pending operation (e.g., Schedule CRUD or Job Trigger). This new operation might successfully create a database record but fail to update the concurrent dictionary if an entry with the same key already exists, leading to operation failure.
Please let me know, so i can send the PR for review.
"Quartz.JobPersistenceException: Unable to add lock instance for lock TriggerAccess on NON_CLUSTERED\n ---> System.Exception: Unable to add lock instance for lock TriggerAccess on NON_CLUSTERED\n at Quartz.Spi.MongoDbJobStore.LockManager.AddLock(LockInstance lockInstance).
This exception is not consistent.
The text was updated successfully, but these errors were encountered: