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
+5 -7
View File
@@ -352,17 +352,15 @@ describe('SharedMemoryBackend — 全分支', () => {
await medium.close();
});
it('close 后操作安全(store null 不抛错)', async () => {
it('close 后操作安全(不抛错;写入不持久化', async () => {
const medium = new SharedMemoryBackend();
await medium.open('sm-3');
await medium.write('k', enc('V'));
await medium.close();
expect(await medium.read('k')).toBeNull();
await medium.write('late', enc('X')); // 静默忽略
await medium.delete('k');
expect(await medium.listKeys()).toEqual([]);
expect(await medium.exists('k')).toBe(false);
await medium.clear();
expect(await medium.read('k')).toBeNull(); // close 后内存清空
await medium.write('late', enc('X')); // 不抛错(游离内存,不持久化)
await medium.delete('k'); // 不抛错
await medium.clear(); // 不抛错
});
it('跨实例共享:close 后新实例可读(持久化语义)', async () => {