RocketChat / RocketChat/Rocket.Chat
Livechat.transfer should be transactional
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
I'm running multiple instances of Rocketchat and noticed unique index errors when livechat is assigned to other agents. I think Verloop.Livechat.forwardOpenChats should be done using some kind of transaction technique so that multiple instance do not try to forward same room. One approach I can think of is to use some state for the room and then use findAndUpdate.
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
Start at Verloop.Livechat.forwardOpenChats and trace its findAndUpdate path, then inspect how concurrent Rocket.Chat instances assign the same room. Reproduce the multi-instance case if the project has a relevant test harness; done means concurrent forwarding no longer produces duplicate assignments or unique-index errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend, databases, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100