Merge 8.4 branch to trunk - #1738
Merged
Merged
Conversation
PXB-3643 [8.0] : Improve xbcloud delete to support Hierarchical Namespaces
PXB-3643 [8.4] : Improve xbcloud delete to support Hierarchical Namespaces
… prepare JIRA: https://perconadev.atlassian.net/browse/PXB-3328 After xtrabackup --prepare completes redo apply, there is no built-in way to verify that the B-tree indexes are structurally correct. Users must restore and run CHECK TABLE on a live server to find corruption. This patch adds --check-tables to xtrabackup --prepare which validates every committed InnoDB index after recovery. The option is only valid during the prepare phase; it is rejected with --backup, --copy-back, --move-back, and other non-prepare modes. It can be combined with --export to validate indexes and produce export artifacts in a single prepare invocation. It works with both --apply-log-only and final prepare since validation is strictly read-only (SX-latch, no writes to pages or dynamic metadata). The implementation has five parts: 1. Dictionary loading: For each tablespace (file-per-table and general), load dict_table_t objects via dict_load_from_spaces_sdi(), similar to what --export already does. 2. Parallel B-tree validation: Spawn --parallel worker threads that call btr_validate_index() on every committed index. All corruptions are reported (no fail-fast). Per-index and per-table names are printed. 3. Graceful assertion handling: InnoDB's btr_validate_level() has 11 ut_a() assertions that crash on corrupted pages. Under #ifdef XTRABACKUP these are converted to soft errors that log a message and return false. Corrupted sibling links (e.g. all-zero pages with FIL_PAGE_NEXT=0) are handled by stopping traversal to prevent infinite loops. 4. LOB corruption detection (PS-9683): Port of Percona Server fix to detect external LOB pages shared between two records, a corruption scenario found in production. Uses blob_ref_map to track LOB first pages through the validation call chain. 5. Test coverage: Two test scripts covering real-world corruption scenarios (PAGE_INDEX_ID corruption, checksum corruption, all-zero pages, multiple corrupted tables), invalid option combinations (--backup --check-tables, --copy-back --check-tables), --export combined with --check-tables, and debug-only injection tests (broken sibling links, wrong index ID, wrong min-record flag, LOB duplicates).
…k-table-prepare PXB-3328 [8.4] : Add --check-tables option to validate InnoDB indexes during prepare
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.
No description provided.