Row level locking with Prisma and PostgreSQL
I’m building an anonymous chat app for learning purpose where users are matched based on gender preferences. The application allows users to go online and be matched with another online user if their gender preferences match. However, I’m encountering an issue where users can end up in circular matches involving three or more users when they go online simultaneously.