fix(P0): SSTable rangeScan 尾块漏读 — 索引块记录块尾 key 但二分按块首语义定位,endKey 落在块尾时下一块被排除导致二级索引查询丢数据(5万行丢106~771条);endBlockIdx 多扫一块 + 4 个 sstable 边界回归 + 重建二级索引大数据量回归(含崩溃恢复)。附带:checkpoint 同步 flush 二级索引 LSM(P1)、kv 后端页面化 + SharedMemoryBackend chunk 化、生产负载验证测试
CI / test (20.x) (push) Successful in 24m55s
CI / test (22.x) (push) Successful in 16m19s
CI / test (24.x) (push) Successful in 20m55s
CI / e2e (push) Successful in 9m54s
CI / test (18.x) (push) Successful in 26m38s

This commit is contained in:
thzxx
2026-08-10 18:18:50 +08:00
parent 25bab0f9aa
commit 34225a86b3
9 changed files with 579 additions and 38 deletions
+3 -3
View File
@@ -171,7 +171,7 @@ describe('AriaEngine + kv 后端(storageBackend: kv', () => {
await e2.close();
});
it('页面化存储:SSTable 页面经 KVStore 读写', async () => {
it('页面化存储:SSTable 拆 4KB 页面经 KVStore 读写v0.6.1 页面化消除整 value 读放大)', async () => {
const dbName = uniqueDB();
const e1 = createEngine();
await e1.open(dbName, 1);
@@ -185,10 +185,10 @@ describe('AriaEngine + kv 后端(storageBackend: kv', () => {
}
await e1.insert('docs', rows);
await (e1 as any).lsm.flush();
// kv 后端:SSTable 整 value 存储(KVStore 日志型天然适合大块,无需拆 4KB 页面
// kv 后端页面化SSTable 存为 pg_ 页面 key(4KB 粒度,缓存按页命中
const kv = (e1 as any).backend.getKV();
const keys = await kv.listKeys();
expect(keys.some((k: string) => k.startsWith('sst_'))).toBe(true);
expect(keys.some((k: string) => k.startsWith('pg_'))).toBe(true);
await e1.close();
const e2 = createEngine();