What happens when a race condition happens in a queue? Let’s say we have a bunch of customer service representatives who are working on cases in the same queue. The queue is sorted by priority and you should always pick the top case. Joel and Marius opens up the queue view at the same time, but Marius is a second faster than Joel to pick the top case. What happens now?
Well, one out of two things.
- Marius chose to pick but not remove the item from the queue.
Joel picks the case, and since the queue item still exists the action taken by him simply resolves and the case is delegated to him.
- Marius chose to pick and remove the item from the queue.
Joel is presented with the following error message
So how do we deal with this?
For scenario 1, here’s a few options:
- Accept that this might happen
- Create a plugin which prevents someone from picking something that’s being worked on
For scenario 2:
- Tell users about this, accept that it might happen
How to reduce the risk of this happening:
- Make sure you teach your users to refresh the list view if it’s been open for a while
- Distribute over several queues to prevent too many people working in the same queue
- Or maybe you have a better idea, drop it into the comment.
Best regards, your friendly neighbourhood Viking!