Skip to content

Conversation

@Tristan1900
Copy link
Contributor

@Tristan1900 Tristan1900 commented Jun 3, 2025

First-time contributors' checklist

What is changed, added or deleted? (Required)

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.4 (TiDB 8.4 versions)
  • v8.3 (TiDB 8.3 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

Signed-off-by: Wenqi Mou <wenqimou@gmail.com>
Signed-off-by: Wenqi Mou <wenqimou@gmail.com>
@ti-chi-bot ti-chi-bot bot added missing-translation-status This PR does not have translation status info. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 3, 2025
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.

Hello @Tristan1900, 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!

Summary of Changes

Hello! Gemini here, providing a summary of this pull request. This PR focuses on updating the documentation for TiDB's Backup & Restore (BR) tool, specifically for Point-in-Time Recovery (PITR). The main goal is to introduce and document two new features available from TiDB v9.0.0: the ability to filter PITR restore operations by database or table, and the capability to run multiple PITR restore operations concurrently. Additionally, the documentation is updated to clarify the compatibility of ongoing log backup tasks with both snapshot and PITR restore operations.

Highlights

  • Concurrent PITR Restores: Introduces documentation for the ability to run multiple tiup br restore point operations simultaneously, provided they target non-overlapping datasets. Includes usage examples.
  • Log Backup Compatibility: Updates and adds documentation sections clarifying the compatibility of ongoing log backup tasks with both snapshot (br restore full|database|table) and PITR (br restore point) restore operations in v9.0.0, including important limitations for PITR.

Changelog

  • br/br-pitr-manual.md
    • Added a new section 'Restore with filters' explaining how to use filters with tiup br restore point, including syntax, examples, and notes (starting around line 499).
    • Added a new section 'Concurrent restore operations' documenting the ability to run multiple PITR restores concurrently, with examples (starting around line 548).
    • Slightly rephrased a sentence in the 'Compatibility between ongoing log backup and snapshot restore' section (around line 588).
    • Added a new section 'Compatibility between ongoing log backup and PITR operations' detailing how PITR interacts with ongoing log backups and noting limitations (starting around line 598).
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

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 issue 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 is currently in preview and 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 to provide feedback.

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 introduces documentation for new PITR (Point-in-Time Recovery) features in TiDB v9.0.0, specifically restoring with filters and concurrent restore operations. It also clarifies compatibility between ongoing log backups and PITR. The changes are well-structured and add valuable information for users. The examples provided are clear and helpful.

I have a few minor suggestions to enhance clarity and adherence to the style guide. Overall, this is a good addition to the documentation.

Summary of Findings

  • Style Guide Adherence: Minor suggestions related to using the second person ('you'), formatting (blank lines), and sentence structure for improved readability, aligning with the provided style guide.
  • Markdown Best Practices: Suggestion to add a newline at the end of the file, which is a common best practice for Markdown files.

Merge Readiness

The pull request significantly improves the documentation by adding details about new PITR features. The content is well-written and informative. The suggested changes are minor and mostly stylistic or for enhanced readability. After addressing these minor points, the documentation should be in excellent shape. As per the style guide, I am providing comments rather than requesting changes to avoid blocking the merge. I am not authorized to approve pull requests; please ensure it undergoes the standard review and approval process.

> - When using filters, ensure that the filtered data maintains referential integrity.
> - Filter options apply to both snapshot and log backup restoration phases.
> - Multiple `--filter` options can be specified to include or exclude different patterns.
> - PITR filtering does not support restoring system tables. System tables are restored according to the full backup data and cannot be selectively filtered during PITR operations. If you need to restore specific system tables, use `br restore full` with filters instead, which will restore only the snapshot backup data (not log backup data).

Choose a reason for hiding this comment

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

medium

This bullet point contains a lot of information in a single sentence, which can make it a bit dense. For improved readability 1, would you consider rephrasing it slightly or breaking it into more digestible parts within the bullet point?

Style Guide References

Suggested change
> - PITR filtering does not support restoring system tables. System tables are restored according to the full backup data and cannot be selectively filtered during PITR operations. If you need to restore specific system tables, use `br restore full` with filters instead, which will restore only the snapshot backup data (not log backup data).
PITR filtering does not support restoring system tables. System tables are restored based on the full backup data and cannot be selectively filtered during PITR operations. If you need to restore specific system tables, use `br restore full` with filters. This command restores only the snapshot backup data, not the log backup data.

Footnotes

  1. The style guide emphasizes clarity, simplicity, and readability. (link)

If such inconsistency occurs during the time range `[t1, t2)`, you cannot restore data from that time period. Instead, you must:
- Restore data up to `t1` (before the inconsistent period), or
- Take a new snapshot backup after `t2` and use that for future PITR operations

Choose a reason for hiding this comment

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

low

It's a common best practice for Markdown files (and text files in general) to end with a newline character. This can prevent potential issues with some tools or systems that process these files and improves diff readability. Could you please add a newline at the very end of this file?

Signed-off-by: Wenqi Mou <wenqimou@gmail.com>
@lilin90 lilin90 added the translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. label Jun 4, 2025
@ti-chi-bot ti-chi-bot bot removed the missing-translation-status This PR does not have translation status info. label Jun 4, 2025
@lilin90 lilin90 added missing-translation-status This PR does not have translation status info. v9.0-beta.2 This PR/issue applies to TiDB v9.0-beta.2. labels Jun 4, 2025
@lilin90 lilin90 self-assigned this Jun 4, 2025
@lilin90 lilin90 self-requested a review June 4, 2025 02:44
@lilin90 lilin90 added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. and removed missing-translation-status This PR does not have translation status info. labels Jun 4, 2025
@lilin90 lilin90 requested review from hfxsd June 16, 2025 08:58
Tristan1900 and others added 3 commits June 26, 2025 20:27
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Wenqi Mou <wenqimou@gmail.com>
@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jul 3, 2025
Co-authored-by: xixirangrang <hfxsd@hotmail.com>
Co-authored-by: Lilian Lee <lilin@pingcap.com>
Copy link
Member

@lilin90 lilin90 left a comment

Choose a reason for hiding this comment

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

/lgtm

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Aug 14, 2025
@ti-chi-bot
Copy link

ti-chi-bot bot commented Aug 14, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-07-03 03:08:21.679343524 +0000 UTC m=+1537154.402522506: ☑️ agreed by hfxsd.
  • 2025-08-14 06:16:38.578429148 +0000 UTC m=+507397.613012376: ☑️ agreed by lilin90.

@ti-chi-bot
Copy link

ti-chi-bot bot commented Aug 15, 2025

@Leavrth: adding LGTM is restricted to approvers and reviewers in OWNERS files.

Details

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@lilin90
Copy link
Member

lilin90 commented Aug 15, 2025

/unhold

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 15, 2025
@lilin90
Copy link
Member

lilin90 commented Aug 15, 2025

/approve

@ti-chi-bot
Copy link

ti-chi-bot bot commented Aug 15, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lilin90

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

The pull request process is described 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 approved label Aug 15, 2025
@ti-chi-bot ti-chi-bot bot merged commit 5182861 into pingcap:master Aug 15, 2025
9 checks passed
@lilin90 lilin90 added the type/compatibility-or-feature-change This PR involves compatibility changes or feature behavior changes. label Aug 19, 2025
@lilin90 lilin90 added the needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. label Dec 18, 2025
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.5: #22199.
But this PR has conflicts, please resolve them!

ti-chi-bot pushed a commit to ti-chi-bot/docs that referenced this pull request Dec 18, 2025
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved lgtm needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. type/compatibility-or-feature-change This PR involves compatibility changes or feature behavior changes. v9.0-beta.2 This PR/issue applies to TiDB v9.0-beta.2.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants