Commit 0ce46de
committed
Implement incremental restore for global indexes
Problem:
- Incremental backup supported indexes but restore did not
- Index data was backed up but not restored
Implementation:
1. Index Discovery and Restore:
- Added DiscoverAndCreateIndexRestoreOperations() to scan __ydb_backup_meta/indexes
- Implemented recursive traversal for nested table structures
- Fixed path matching to avoid false positives (exact match or with '/' separator)
- Creates restore operations for each index impl table found
2. Schema Version Synchronization:
- Relies on CDC sync functions already present in main
- Main's SyncImplTableVersion and SyncIndexEntityVersion handle version sync
- No additional AlterTableIndex operations needed
3. Testing:
- Added 5 comprehensive test cases covering various scenarios
- Tests verify both data integrity and index functionality
- Direct index impl table verification for stronger assertions
Files Modified:
- schemeshard_impl.h: Function declarations for index discovery
- schemeshard_incremental_restore_scan.cpp: Index discovery and restore logic
- datashard_ut_incremental_backup.cpp: Test cases
This ensures indexes are properly restored and remain queryable.1 parent fd5e49e commit 0ce46de
File tree
3 files changed
+897
-1
lines changed- ydb/core/tx
- datashard
- schemeshard
3 files changed
+897
-1
lines changed
0 commit comments