/** * Index Recovery and Validation * * Ensures indexes are valid and consistent after crashes or data corruption. * Automatically rebuilds stale or missing indexes on startup. */ import type { Collection } from './collection.js'; export interface IndexRecoveryReport { collectionName: string; indexesChecked: number; indexesRebuilt: number; duration: number; errors: string[]; } /** * Validate and repair indexes across a collection. */ export declare function validateAndRepairIndexes(collection: Collection): Promise; /** * Batch validate multiple collections. */ export declare function validateMultipleCollections(collections: Collection[]): Promise; /** * Index consistency checker for detecting corruption. */ export declare class IndexConsistencyChecker { /** * Check if index entries match collection data. */ static checkEntryCount(collection: Collection, indexName: string, expectedCount: number): Promise; /** * Detect orphaned index entries (entries for deleted records). */ static detectOrphanedEntries(collection: Collection): Promise; /** * Detect missing index entries (records not in index). */ static detectMissingEntries(collection: Collection): Promise; } /** * Index repair strategies for different corruption scenarios. */ export declare class IndexRepairStrategy { /** * Full rebuild: Delete and recreate all indexes from scratch. */ static fullRebuild(collection: Collection): Promise; /** * Partial repair: Only rebuild stale indexes. */ static partialRepair(collection: Collection): Promise; /** * Incremental repair: Fix corruption by replaying operations. */ static incrementalRepair(collection: Collection): Promise; } //# sourceMappingURL=index-recovery.d.ts.map