auditt800
PPrisma
•Created by auditt800 on 9/16/2024 in #help-and-questions
Prisma Interactive transactions not waiting on await statement
Using
isolationLevel: Prisma.TransactionIsolationLevel.Serializable
seems to have solved the problem.
The new issue after that was Transaction failed due to a write conflict or a deadlock. Please retry your transaction
I added the retry logic, but the issue didn't resolve.
So I made all three createMany calls, in my code, serial and the issue was gone.
Initially I was collecting promises of the three createMany calls, then resolving it using Promise.all(promises);
This parallel calls seems to be causing write conflict or a deadlock.
Let me know if there is a better approach to solve this.
And also if the current solution is reliable
Solution:
2 replies