[8.4] Serialize and Restore Schema command - [MOD-11803]#7142
Merged
Conversation
* layout basic schema command generation * implement IndexSpec_Serialize and IndexSpec_Deserialize * added a unit-test * fix warning * implement mock API * implement restore schema command * add tests (and a dump debug command) * improve test * remove temporary logs * fix tests (cherry picked from commit 5feebc4)
2 tasks
GuyAv46
approved these changes
Oct 23, 2025
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 8.4 #7142 +/- ##
==========================================
- Coverage 85.67% 85.47% -0.20%
==========================================
Files 327 327
Lines 51945 50992 -953
Branches 10921 10921
==========================================
- Hits 44503 43587 -916
+ Misses 7276 7239 -37
Partials 166 166
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Backport of #7032 to
8.4.Note
Introduce schema serialization (FT.DEBUG DUMP_SCHEMA) and internal restore (FT._RESTOREIFNX SCHEMA), plus refactors for GC start and RDB (de)serialization utilities with tests.
FT._RESTOREIFNX SCHEMA <encver> <blob>to restore an index schema viaIndexSpec_Deserialize.FT.DEBUG DUMP_SCHEMA <index>returning serialized schema andINDEX_CURRENT_VERSION.RS_RESTORE_IF_NXand its subcommand.IndexSpec_Serialize/IndexSpec_Deserializeusing module data type save/load to/from string.IndexSpec_RdbLoad_Logicand save wrapper; update type registration to use them.IndexSpec_StartGCto remove ctx param and useRSDummyContext; update callers.IndexSpec_StoreAfterRdbLoad; adjust RDB load paths accordingly.SaveDataTypeToString/LoadDataTypeFromStringEncver.DUMP_SCHEMAand_RESTOREIFNX SCHEMAbehavior and errors.Written by Cursor Bugbot for commit 0222840. This will update automatically on new commits. Configure here.