release: v0.2.5 — 质量加固 + Bug修复 + 性能优化 + SQL扩展
CI / test (18.x) (push) Successful in 10m4s
CI / test (20.x) (push) Successful in 10m0s
CI / test (22.x) (push) Successful in 9m58s
CI / test (24.x) (push) Successful in 9m58s

This commit is contained in:
thzxx
2026-07-29 21:50:53 +08:00
parent 29d779d96a
commit eb79b2198e
34 changed files with 2017 additions and 298 deletions
+6 -4
View File
@@ -59,8 +59,8 @@ export class WAL {
// 写入
// =======================================================================
/** 追加一条 WAL 记录 */
append(record: Omit<WALRecord, 'lsn' | 'checksum'>): void {
/** 追加一条 WAL 记录full 模式同步等待写入完成) */
async append(record: Omit<WALRecord, 'lsn' | 'checksum'>): Promise<void> {
if (!this.enabled) return;
this.lsn++;
@@ -73,10 +73,12 @@ export class WAL {
const bytes = this.encodeRecord(fullRecord);
if (this.syncMode === 'full') {
this.store.append(bytes).catch(() => {
try {
await this.store.append(bytes);
} catch {
// eslint-disable-next-line no-console
console.warn('[AriaEngine WAL] Failed to append record');
});
}
} else if (this.syncMode === 'batch') {
this.buffer.push(bytes);
}