From 21cb13046c3f11838fae63ea538dc919ce7c0c4e Mon Sep 17 00:00:00 2001 From: Roy Hashimoto Date: Thu, 16 Apr 2026 09:40:25 -0700 Subject: [PATCH] Fix manual checkpoint in exclusive locking mode. --- src/examples/OPFSWriteAheadVFS.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/examples/OPFSWriteAheadVFS.js b/src/examples/OPFSWriteAheadVFS.js index 3f20efc5..e425c678 100644 --- a/src/examples/OPFSWriteAheadVFS.js +++ b/src/examples/OPFSWriteAheadVFS.js @@ -811,7 +811,7 @@ export class OPFSWriteAheadVFS extends FacadeVFS { async #pendingCheckpoint(file, mode) { const onFinally = []; try { - if (mode !== 'passive') { + if (mode !== 'passive' && file.lockState === VFS.SQLITE_LOCK_NONE) { await file.writeLock.acquire('exclusive'); onFinally.push(() => file.writeLock.release());