fix(archive): give rebuildDirectory's transaction room to acquire a connection (BIT-31703)
Prisma's default maxWait is 2s; under brief pool contention (e.g. assignGalleries holding a connection under its advisory lock) rebuildDirectory's $transaction could fail to even start with 'Unable to start a transaction in the given time', despite already allowing 60s for the transaction body itself via timeout.
This commit is contained in:
1 parent
aabe9f7e83
commit
cc702eeabf
1 file changed
+1
-1
@@ -1384,7 +1384,7 @@ export class ArchiveService {
|
||||
where: { id: sourceId, OR: [{ directoryDirtyAt: null }, { directoryDirtyAt: { lte: started } }] },
|
||||
data: { directoryBuiltAt: new Date(), directoryDirtyAt: null },
|
||||
});
|
||||
}, { timeout: 60_000 });
|
||||
}, { timeout: 60_000, maxWait: 60_000 });
|
||||
return rows.length;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user