release: v0.2.4 二级索引 + MVCC + BloomFilter + WAL全同步 + 内存预算
This commit is contained in:
Vendored
+16
-8
@@ -649,19 +649,17 @@ interface AriaEngineConfig {
|
||||
compression?: boolean;
|
||||
/** 存储后端 */
|
||||
storageBackend?: 'indexeddb' | 'opfs' | 'memory';
|
||||
/** WAL 大小阈值(字节,超过则强制 checkpoint,默认 16MB) */
|
||||
walSizeThreshold?: number;
|
||||
/** 最大内存预算(MB,默认 64) */
|
||||
maxMemoryMB?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* AriaEngine — 自研页面式存储引擎主类
|
||||
* @module engine/aria/index
|
||||
*
|
||||
* 实现 IStorageEngine 接口。
|
||||
*
|
||||
* v0.2.1: 完整持久化
|
||||
* - Schema 存入 __aria_schemas
|
||||
* - SSTable 元数据存入 __aria_lsm_meta
|
||||
* - WAL 恢复包含行数据
|
||||
* - 启动时自动加载 Schema + SSTable
|
||||
* v0.2.4: 二级索引 + MVCC 集成 + 生产加固
|
||||
*/
|
||||
|
||||
declare class AriaEngine implements IStorageEngine {
|
||||
@@ -676,8 +674,11 @@ declare class AriaEngine implements IStorageEngine {
|
||||
private schemas;
|
||||
private tablePKs;
|
||||
private opCounter;
|
||||
private secondaryIndexes;
|
||||
private mvcc;
|
||||
private currentTxnId;
|
||||
private txnSnapshot;
|
||||
private gcCounter;
|
||||
constructor(config?: AriaEngineConfig);
|
||||
open(dbName: string, _version: number): Promise<void>;
|
||||
close(): Promise<void>;
|
||||
@@ -697,7 +698,6 @@ declare class AriaEngine implements IStorageEngine {
|
||||
commitTransaction(): Promise<void>;
|
||||
rollbackTransaction(): Promise<void>;
|
||||
private getAllRows;
|
||||
private tryIndexLookup;
|
||||
private getPK;
|
||||
private validateRow;
|
||||
private checkType;
|
||||
@@ -705,6 +705,14 @@ declare class AriaEngine implements IStorageEngine {
|
||||
private loadSchemas;
|
||||
private createSSTableStore;
|
||||
private applyWALRecord;
|
||||
/** 更新行的二级索引条目 */
|
||||
private updateSecondaryIndexes;
|
||||
/** 通过二级索引快速查找 */
|
||||
private tryIndexLookup;
|
||||
/** 从索引扫描结果恢复完整行 */
|
||||
private indexScanToRows;
|
||||
/** 每 10 次 gc 计数器触发一次 MVCC 垃圾回收 */
|
||||
private tryGC;
|
||||
private ensureOpen;
|
||||
private ensureTable;
|
||||
/** Get the number of WAL records stored */
|
||||
|
||||
Reference in New Issue
Block a user