diff --git a/apps/backend/src/prisma-client.tsx b/apps/backend/src/prisma-client.tsx index fc0f8e208..c2061c504 100644 --- a/apps/backend/src/prisma-client.tsx +++ b/apps/backend/src/prisma-client.tsx @@ -217,6 +217,9 @@ class TransactionErrorThatShouldNotBeRetried extends Error { } } +/** + * @deprecated Prisma transactions are slow and lock the database. Use rawQuery with CTEs instead. Ask Konsti if you're confused or think you need transactions. + */ export async function retryTransaction(client: Omit, fn: (tx: PrismaClientTransaction) => Promise, options: { level?: "default" | "serializable" } = {}): Promise { // serializable transactions are currently off by default, later we may turn them on const enableSerializable = options.level === "serializable";