Repository navigation
[8.6-rse] [MOD-15685] Fix crash when a legacy index spec is restored after a failed replication sync - #11626
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f738a99f8f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if (encver < LEGACY_INDEX_MIN_VERSION || encver > LEGACY_INDEX_MAX_VERSION) { | ||
| return NULL; | ||
| } | ||
| // Upgrading a legacy spec only makes sense while an RDB load is in progress: the upgrade sweep that |
There was a problem hiding this comment.
The new comment is 102 characters long, exceeding the repository's documented 100-character C line limit; wrap it to keep src/spec.c compliant.
AGENTS.md reference: AGENTS.md:L51-L51
Useful? React with 👍 / 👎.
…iled replication sync (#11619) [MOD-15685] Refuse a legacy index spec RESTORE after a failed load The guard added in #10872 refused a legacy ft_index0 load when the legacy-spec registry or the UPGRADE_INDEX rules were NULL, taking that as "no load in progress". A failed load breaks that assumption: LOADING_FAILED clears the loading flag but frees neither global, and the rules are only ever freed by a successful load. On a server that has not completed a load since startup - for example a replica whose first full sync failed and was then promoted - a RESTORE of a truncated legacy payload got past the guard and crashed on the NULL spec name. Key the refusal on g_isLoading as well. The new test drives exactly that sequence against a fake master; it crashes the server without the fix. Co-authored-by: Claude Opus 5.5 <[email protected]> (cherry picked from commit b1b6903)
f738a99 to
1c79e3e
Compare
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|



Backport of #11619 to
8.6-rse.Original PR
b1b6903a1cc5b314fc64329f1434ff8f09710fddCherry-pick result
Conflict Log
src/spec.ctests/pytests/test_legacy_module_types.pyRelease notes
🤖 Generated by the auto-backport workflow.