Skip to content

Conversation

@qiancai
Copy link
Collaborator

@qiancai qiancai commented Jan 13, 2026

What is changed, added or deleted? (Required)

This PR covers all doc updates for v8.5.5 that have been merged to the feature/preview-v8.5.5 branch.

Which TiDB version(s) do your changes apply to? (Required)

Tips for choosing the affected version(s):

By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.

For details, see tips for choosing the affected versions.

  • master (the latest development version)
  • v9.0 (TiDB 9.0 versions)
  • v8.5 (TiDB 8.5 versions)
  • v8.1 (TiDB 8.1 versions)
  • v7.5 (TiDB 7.5 versions)
  • v7.1 (TiDB 7.1 versions)
  • v6.5 (TiDB 6.5 versions)
  • v6.1 (TiDB 6.1 versions)
  • v5.4 (TiDB 5.4 versions)

What is the related PR or file link(s)?

Do your changes match any of the following descriptions?

  • Delete files
  • Change aliases
  • Need modification after applied to another branch
  • Might cause conflicts after applied to another branch

ti-chi-bot and others added 13 commits December 29, 2025 02:20
* Add temp.md

* Delete temp.md

* toc, br: add compact log backup

* Update wording

* Remove example output

* Apply suggestions from code review

Co-authored-by: 山岚 <36239017+YuJuncen@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: xixirangrang <hfxsd@hotmail.com>

* Apply suggestions from code review

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Apply suggestions from code review

---------

Co-authored-by: Lilian Lee <lilin@pingcap.com>
Co-authored-by: 山岚 <36239017+YuJuncen@users.noreply.github.com>
Co-authored-by: xixirangrang <hfxsd@hotmail.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…2168)

* added translation (by Claude 3.7 Sonnet Thinking)

* tweaking some terms

* Refine wording and format

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update wording

* Update br/br-pitr-manual.md

Co-authored-by: xixirangrang <hfxsd@hotmail.com>

* Update version wording

Co-authored-by: Grace Cai <qqzczy@126.com>

---------

Co-authored-by: hillium <yu745514916@live.com>
Co-authored-by: Lilian Lee <lilin@pingcap.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: xixirangrang <hfxsd@hotmail.com>
Co-authored-by: Grace Cai <qqzczy@126.com>
@ti-chi-bot ti-chi-bot bot added the missing-translation-status This PR does not have translation status info. label Jan 13, 2026
@ti-chi-bot
Copy link

ti-chi-bot bot commented Jan 13, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign icemap for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jan 13, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello @qiancai, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request consolidates and updates the documentation for TiDB v8.5.5, primarily focusing on the Backup & Restore (BR) tool. It introduces comprehensive guides for the new "Compact Log Backup" feature, which optimizes Point-in-Time Recovery (PITR) by converting log backups to SST files. The updates also significantly enhance PITR operations with new capabilities like filtered restores, concurrent execution, and better integration with ongoing log backups. Furthermore, the documentation details improvements to checkpoint restore mechanisms, introduces a physical system table restore option, and describes new system variables related to log backup and circuit breakers, ensuring users have up-to-date information on these critical features.

Highlights

  • New "Compact Log Backup" Feature Documentation: Introduced a new document explaining how to improve Point-in-Time Recovery (PITR) efficiency by compacting log backups into SST format, including its overview, limitations, and manual usage.
  • Enhanced Point-in-Time Recovery (PITR) Capabilities: Documentation updates cover new features for PITR, including restoring data using filters, performing concurrent restore operations, and improved compatibility with ongoing log backup tasks.
  • Checkpoint Restore Mechanism Updates: Detailed explanations for storing checkpoint data, differentiating between downstream cluster and external storage options, and clarifying persistence of pitr_id_map.
  • Physical System Table Restore: Introduced the --fast-load-sys-tables parameter for br restore to enable physical restoration of system tables, offering an alternative to logical restoration.
  • New System Variables: Added documentation for tidb_advancer_check_point_lag_limit (controlling log backup checkpoint lag) and tidb_cb_pd_metadata_error_rate_threshold_ratio (for TiDB circuit breaker).
  • Improved Restore Process Visibility: Updated progress bar outputs for both snapshot and PITR restores to include more detailed metrics like Split&Scatter Region, Download&Ingest SST, and Restore Pipeline.
  • Table Mode During Restore: Clarified that tables are set to restore mode during data restoration, preventing read/write operations until completion.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request includes several documentation updates for the v8.5.5 release, primarily focusing on Backup & Restore (BR) features and new system variables. The changes are comprehensive and well-structured. I've added a few minor suggestions to improve clarity, fix grammar, and add helpful links to related documentation. Overall, the updates are clear and will be beneficial for users.

Comment on lines +160 to +162
> **Note:**
>
> To ensure compatibility with clusters of earlier versions, starting from v8.5.5, if the system table `mysql.tidb_pitr_id_map` does not exist in the restore cluster and the `--checkpoint-storage` parameter is not specified, the `pitr_id_map` data will be written to the log backup directory. The file name is `pitr_id_maps/pitr_id_map.cluster_id:{downstream-cluster-ID}.restored_ts:{restored-ts}`.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

low

This note appears to be a duplicate of the one on lines 94-96 and is placed in a confusing section. The condition --checkpoint-storage parameter is not specified describes the default behavior, which is already covered in the "store checkpoint data in the downstream cluster" section. To avoid confusion, I suggest removing this note.


> **Note:**
>
> - If the `--load-creds` option is included when you execute the preceding command, the encoded Base64 string contains credential information loaded from the current BR environment. Note to ensure proper security and access control.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

low

The phrase "Note to ensure" is a bit awkward. For better clarity and to follow the style guide's recommendation of using the second person, I suggest rephrasing it.

Suggested change
> - If the `--load-creds` option is included when you execute the preceding command, the encoded Base64 string contains credential information loaded from the current BR environment. Note to ensure proper security and access control.
> - If you include the `--load-creds` option when you execute the preceding command, the encoded Base64 string contains credential information loaded from the current BR environment. Be sure to handle this string with proper security and access control.

- Starting from BR v5.1.0, when you back up snapshots, BR automatically backs up the **system tables** in the `mysql` schema, but does not restore these system tables by default.
- Starting from v6.2.0, BR lets you specify `--with-sys-table` to restore **data in some system tables**.
- Starting from v7.6.0, BR enables `--with-sys-table` by default, which means that BR restores **data in some system tables** by default.
- Starting from v8.5.5, BR introduces the `--fast-load-sys-tables` parameter to support physical restore of system tables. This parameter is enabled by default. This approach uses the `RENAME TABLE` DDL statement to atomically swap the system tables in the `__TiDB_BR_Temporary_mysql` database with the system tables in the `mysql` database. Unlike the logical restoration of system tables using the `REPLACE INTO` SQL statement, physical restoration completely overwrites the existing data in the system tables.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

low

To improve readability and provide more context for the user, consider adding links to the documentation for RENAME TABLE and REPLACE INTO.

Suggested change
- Starting from v8.5.5, BR introduces the `--fast-load-sys-tables` parameter to support physical restore of system tables. This parameter is enabled by default. This approach uses the `RENAME TABLE` DDL statement to atomically swap the system tables in the `__TiDB_BR_Temporary_mysql` database with the system tables in the `mysql` database. Unlike the logical restoration of system tables using the `REPLACE INTO` SQL statement, physical restoration completely overwrites the existing data in the system tables.
- Starting from v8.5.5, BR introduces the `--fast-load-sys-tables` parameter to support physical restore of system tables. This parameter is enabled by default. This approach uses the [`RENAME TABLE`](/sql-statements/sql-statement-rename-table.md) DDL statement to atomically swap the system tables in the `__TiDB_BR_Temporary_mysql` database with the system tables in the `mysql` database. Unlike the logical restoration of system tables using the [`REPLACE INTO`](/sql-statements/sql-statement-replace.md) SQL statement, physical restoration completely overwrites the existing data in the system tables.

When the backup and restore feature backs up data, it stores statistics in JSON format within the `backupmeta` file. When restoring data, it loads statistics in JSON format into the cluster. For more information, see [LOAD STATS](/sql-statements/sql-statement-load-stats.md).

Starting from v8.5.5, BR introduces the `--fast-load-sys-tables` parameter, which is enabled by default. When restoring data to a new cluster using the `br` command-line tool, and the IDs of tables and partitions between the upstream and downstream clusters can be reused (otherwise, BR will automatically fall back to logically load statistics), enabling `--fast-load-sys-tables` lets BR to first restore the statistics-related system tables to the temporary system database `__TiDB_BR_Temporary_mysql`, and then atomically swap these tables with the corresponding tables in the `mysql` database using the `RENAME TABLE` statement.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

low

There's a minor grammatical error ('lets BR to first restore'). Also, for better readability, consider adding a link to the RENAME TABLE documentation.

Suggested change
Starting from v8.5.5, BR introduces the `--fast-load-sys-tables` parameter, which is enabled by default. When restoring data to a new cluster using the `br` command-line tool, and the IDs of tables and partitions between the upstream and downstream clusters can be reused (otherwise, BR will automatically fall back to logically load statistics), enabling `--fast-load-sys-tables` lets BR to first restore the statistics-related system tables to the temporary system database `__TiDB_BR_Temporary_mysql`, and then atomically swap these tables with the corresponding tables in the `mysql` database using the `RENAME TABLE` statement.
Starting from v8.5.5, BR introduces the `--fast-load-sys-tables` parameter, which is enabled by default. When restoring data to a new cluster using the `br` command-line tool, and the IDs of tables and partitions between the upstream and downstream clusters can be reused (otherwise, BR will automatically fall back to logically load statistics), enabling `--fast-load-sys-tables` lets BR first restore the statistics-related system tables to the temporary system database `__TiDB_BR_Temporary_mysql`, and then atomically swap these tables with the corresponding tables in the `mysql` database using the [`RENAME TABLE`](/sql-statements/sql-statement-rename-table.md) statement.


> **Note:**
>
> Unlike the logical restoration of system tables using the `REPLACE INTO` SQL statement, physical restoration completely overwrites the existing data in the system tables.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

low

To improve readability, consider adding a link to the REPLACE INTO documentation.

Suggested change
> Unlike the logical restoration of system tables using the `REPLACE INTO` SQL statement, physical restoration completely overwrites the existing data in the system tables.
> Unlike the logical restoration of system tables using the [`REPLACE INTO`](/sql-statements/sql-statement-replace.md) SQL statement, physical restoration completely overwrites the existing data in the system tables.

@ti-chi-bot ti-chi-bot bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jan 14, 2026
ti-chi-bot and others added 2 commits January 14, 2026 10:03
…22306)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Aolin <aolinz@outlook.com>
Co-authored-by: Grace Cai <qqzczy@126.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

missing-translation-status This PR does not have translation status info. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants