fix: v0.6.0 复查修正 — KVStore 快照损坏水位 bug(metaSeq 误跳日志)+ 快照损坏测试盲区修复(此前篡改未生效)+ metaSeq 回归测试 + KVStoreEngine 真实浏览器 e2e(3 用例)+ 版本/配置文档校准
CI / test (20.x) (push) Successful in 10m51s
CI / test (18.x) (push) Successful in 10m59s
CI / test (22.x) (push) Successful in 10m47s
CI / test (24.x) (push) Successful in 10m41s
CI / e2e (push) Successful in 9m52s

This commit is contained in:
thzxx
2026-08-10 14:11:44 +08:00
parent 24b3ca1079
commit a9e1a281d3
20 changed files with 186 additions and 140 deletions
+10 -6
View File
@@ -17,23 +17,27 @@
/**
* 创建并打开 Aria 库。
* opts: {
* name, diskEngine ('opfs'|'indexeddb'|'memory'),
* name, diskEngine ('opfs'|'memory'),
* walSyncMode, checkpointInterval,
* encryptionPassword, memtableSizeThreshold
* }
*/
open: async (opts) => {
const db = await window.MetonaSqlark.create({
// opts.mode: 'aria'(默认)| 'disk'KVStoreEngine
const config = {
name: opts.name,
mode: 'aria',
mode: opts.mode || 'aria',
diskEngine: opts.diskEngine || 'opfs',
aria: {
};
if (opts.mode !== 'disk') {
config.aria = {
walSyncMode: opts.walSyncMode || 'full',
checkpointInterval: opts.checkpointInterval || 100000,
memtableSizeThreshold: opts.memtableSizeThreshold || 64 * 1024 * 1024,
...(opts.encryptionPassword ? { encryption: { password: opts.encryptionPassword } } : {}),
},
});
};
}
const db = await window.MetonaSqlark.create(config);
window.__ms.__db = db;
return { ok: true, engineName: db.getEngine().name };
},