feat(storage): add Bitcask storage migration, binary WAL, and data compaction support

This commit is contained in:
2026-04-04 19:49:47 +00:00
parent 9e7ce25b45
commit d8a8259c73
22 changed files with 2807 additions and 412 deletions

View File

@@ -2,6 +2,7 @@ import * as crypto from 'crypto';
import * as path from 'path';
import * as os from 'os';
import { SmartdbServer } from '../ts_smartdb/index.js';
import { StorageMigrator } from '../ts_migration/index.js';
/**
* Connection information returned by LocalSmartDb.start()
@@ -73,6 +74,10 @@ export class LocalSmartDb {
throw new Error('LocalSmartDb is already running');
}
// Run storage migration before starting the Rust engine
const migrator = new StorageMigrator(this.options.folderPath);
await migrator.run();
// Use provided socket path or generate one
this.generatedSocketPath = this.options.socketPath ?? this.generateSocketPath();