release: v0.4.3 — 关闭时序与后台任务加固(close 排空、失败不吞错、compaction 竞态修复)+ 提交先 WAL
CI / test (18.x) (push) Successful in 10m6s
CI / test (20.x) (push) Successful in 10m11s
CI / test (22.x) (push) Successful in 10m4s
CI / test (24.x) (push) Successful in 10m0s

This commit is contained in:
thzxx
2026-08-09 19:48:06 +08:00
parent 22b0b1fad4
commit d269bdfb75
23 changed files with 964 additions and 360 deletions
+9 -1
View File
@@ -118,7 +118,7 @@ interface MetonaPlugin {
/** 销毁 */
destroy(): void;
}
declare const VERSION = "0.4.2";
declare const VERSION = "0.4.3";
/**
* metona-sqlark Plugin — 插件系统
@@ -853,6 +853,14 @@ declare class OPFSEngine implements IStorageEngine {
private tablesDir;
private dbName;
private memoryCache;
/**
* v0.4.3-fix: 写操作串行队列 — 内存写 + 快照 + 文件持久化整体排队执行,
* close() 等待队列排空后再释放目录句柄(避免 close 后挂起写泄漏/读旧数据)。
* 前一个操作失败不阻塞后续(错误仍返回给调用方)。
*/
private opQueue;
/** 将写操作加入串行队列(快照在队列内取,始终最新) */
private enqueueOp;
open(dbName: string, version: number): Promise<void>;
close(): Promise<void>;
isOpen(): boolean;