perf: Ensure collab persistence cannot hold lock for more than 15s (#10927)

This commit is contained in:
Tom Moor authored and GitHub committed 2025-12-15 23:19:52 -05:00
1 parent e6d4ae0c87
commit 08eab03041
1 file changed
+4
@@ -30,6 +30,10 @@ export default async function documentCollaborativeUpdater({
clientVersion,
}: Props) {
return sequelize.transaction(async (transaction) => {
await sequelize.query(`SET LOCAL lock_timeout = '15s';`, {
transaction,
});
const document = await Document.unscoped()
.scope("withoutState")
.findOne({