feat(storage): add Bitcask storage migration, binary WAL, and data compaction support
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user