Commit d298e46
committed
Fix schema version mismatch for index restore with AtTable operation
Problem:
- After restoring index impl tables, schema version mismatch occurred
- Index metadata expected version X but impl table had version X+1
- Tests failed with: "schema version mismatch during metadata loading"
Root Cause:
- Index impl table restore incremented the impl table's schema version
- Parent index metadata schema version was not updated
- This caused a mismatch when querying the restored table
Solution:
- Added AtTable operation at the index path after impl table restore
- Mirrors CDC stream pattern (schemeshard__operation_backup_backup_collection.cpp:218)
- AtTable operation syncs index metadata schema version with impl table
- Ensures index object and impl table stay in sync
The fix creates two operations per index restore:
1. Restore impl table (increments impl table schema version)
2. AtTable at index path (syncs index metadata schema version)
This matches how CDC streams handle the same issue when creating
streams on index impl tables during backup operations.1 parent 0197f82 commit d298e46
File tree
1 file changed
+35
-0
lines changed- ydb/core/tx/schemeshard
1 file changed
+35
-0
lines changedLines changed: 35 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
857 | 857 | | |
858 | 858 | | |
859 | 859 | | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
860 | 895 | | |
861 | 896 | | |
862 | 897 | | |
| |||
0 commit comments