HangfireIO / HangfireIO/Hangfire
Jobs are fetched LIFO and not FIFO from a queue
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 10.1k
- Forks
- 1.8k
- Avg merge
- 1h 19m
- Merged PRs (30d)
- 1
Description
In our setup we are using MAMQ with SQL Server as backend storage.
We recently had a situation where Jobs where enqueued faster than they could be processed leading to an increasing queue of jobs.
We observed that jobs where in the queue for multiple hours, while recently enqueued jobs would get fetched and processed.
So the queue seems to be a stack (LIFO), rather than a queue (FIFO).
Is there anything to ensure that the oldest jobs in the queue get fetched an processed first?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are identified. Start by tracing the queue-fetch path for the MAMQ backend using SQL Server, then reproduce the behavior with jobs enqueued faster than they are processed. Done means the oldest queued jobs are fetched before newer jobs rather than observing LIFO ordering.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100