feat(storage): add Bitcask storage migration, binary WAL, and data compaction support
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { RustDbBridge } from '../rust-db-bridge.js';
|
||||
import { StorageMigrator } from '../../ts_migration/index.js';
|
||||
import type {
|
||||
IOpLogEntry,
|
||||
IOpLogResult,
|
||||
@@ -75,6 +76,12 @@ export class SmartdbServer {
|
||||
throw new Error('Server is already running');
|
||||
}
|
||||
|
||||
// Run storage migration for file-based storage before starting Rust engine
|
||||
if (this.options.storage === 'file' && this.options.storagePath) {
|
||||
const migrator = new StorageMigrator(this.options.storagePath);
|
||||
await migrator.run();
|
||||
}
|
||||
|
||||
const spawned = await this.bridge.spawn();
|
||||
if (!spawned) {
|
||||
throw new Error(
|
||||
|
||||
Reference in New Issue
Block a user