Skip to content

Conversation

@ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #21913

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.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

qiancai and others added 30 commits November 27, 2025 09:45
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: 山岚 <36239017+YuJuncen@users.noreply.github.com>
Signed-off-by: 童剑 <1045931706@qq.com>
Co-authored-by: hongyunyan <649330952@qq.com>
Co-authored-by: Aolin <aolinz@outlook.com>
Co-authored-by: Grace Cai <qqzczy@126.com>
@ti-chi-bot ti-chi-bot added lgtm size/L Denotes a PR that changes 100-499 lines, ignoring generated files. type/cherry-pick-for-release-8.5 This PR is cherry-picked to release-8.5 from a source PR. labels Nov 27, 2025
@ti-chi-bot ti-chi-bot mentioned this pull request Nov 27, 2025
14 tasks
@gemini-code-assist
Copy link

Summary of Changes

Hello @ti-chi-bot, 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 integrates the release notes for TiDB version 8.5.4 into the documentation. It provides a detailed overview of the latest features, system compatibility adjustments, performance enhancements, and critical bug fixes implemented across various components of the TiDB distributed database system. The update ensures that users and developers have access to the most current information regarding the changes in this specific release.

Highlights

  • New TiDB 8.5.4 Release Notes: This PR introduces the comprehensive release notes for TiDB version 8.5.4, detailing new features, compatibility changes, improvements, and bug fixes across the TiDB ecosystem.
  • Experimental Table Data Redistribution: TiDB 8.5.4 adds experimental support for redistributing data of specific tables to address uneven data distribution across TiKV nodes, complementing the cluster-wide automatic scheduling.
  • Embedded ANALYZE in DDL Statements: DDL statements like ADD INDEX, MODIFY COLUMN, and CHANGE COLUMN can now automatically run ANALYZE to ensure accurate optimizer statistics immediately after index creation or reorganization.
  • Global Indexes on Non-Unique Partitioned Table Columns: The restriction on creating global indexes on non-unique columns of partitioned tables has been removed, enhancing the usability and flexibility of global indexes.
  • Graceful TiFlash Shutdown: TiFlash now supports graceful shutdowns, allowing in-progress MPP tasks to complete within a configurable timeout before the server fully shuts down.
  • New TiCDC Architecture: An optional new TiCDC architecture is introduced, offering improved performance, near-linear scalability, and stability for data replication, especially with high write workloads and frequent DDL operations.
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 adds the release notes for TiDB v8.5.4 and updates the table of contents and release timeline. The changes are generally well-written, but I've identified several areas for improvement in releases/release-8.5.4.md to enhance clarity, conciseness, and correctness. My suggestions include fixing a potentially broken link, correcting minor formatting issues, and improving wording for better readability.


When configured to use this new architecture, TiCDC achieves near-linear scalability and can replicate millions of tables with lower resource consumption. It also reduces changefeed latency and delivers more stable performance in scenarios with high write workloads, frequent DDL operations, and cluster scaling. Note that the new architecture currently has some [initial limitations](https://docs.pingcap.com/tidb/v8.5/ticdc-architecture#limitations).

To use the new architecture, set the TiCDC configuration item [`newarch`](https://docs.pingcap.com/tidb/v8.5/ticdc-server-config#newarch-new-in-v854-release1) to `true`.

Choose a reason for hiding this comment

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

medium

The link anchor newarch-new-in-v854-release1 appears to contain a typo. For consistency with other new feature links in this document, it should likely be newarch-new-in-v854.

Suggested change
To use the new architecture, set the TiCDC configuration item [`newarch`](https://docs.pingcap.com/tidb/v8.5/ticdc-server-config#newarch-new-in-v854-release1) to `true`.
To use the new architecture, set the TiCDC configuration item [`newarch`](https://docs.pingcap.com/tidb/v8.5/ticdc-server-config#newarch-new-in-v854) to `true`.


* Support gracefully shutting down TiFlash [#10266](https://github.com/pingcap/tiflash/issues/10266) @[gengliqi](https://github.com/gengliqi)

When shutting down a TiFlash server, TiFlash now lets currently running MPP tasks continue for a configurable timeout duration, while rejecting new MPP task requests. The default timeout duration is 600 seconds, and you can adjust it using the [`flash.graceful_wait_shutdown_timeout`](https://docs.pingcap.com/tidb/v8.5/tiflash-configuration#graceful_wait_shutdown_timeout-new-in-v854) configuration item.

Choose a reason for hiding this comment

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

low

The word "lets" is a bit informal for technical documentation. Using "allows ... to continue" would be more appropriate.

Suggested change
When shutting down a TiFlash server, TiFlash now lets currently running MPP tasks continue for a configurable timeout duration, while rejecting new MPP task requests. The default timeout duration is 600 seconds, and you can adjust it using the [`flash.graceful_wait_shutdown_timeout`](https://docs.pingcap.com/tidb/v8.5/tiflash-configuration#graceful_wait_shutdown_timeout-new-in-v854) configuration item.
When shutting down a TiFlash server, TiFlash now allows currently running MPP tasks to continue for a configurable timeout duration, while rejecting new MPP task requests. The default timeout duration is 600 seconds, and you can adjust it using the [`flash.graceful_wait_shutdown_timeout`](https://docs.pingcap.com/tidb/v8.5/tiflash-configuration#graceful_wait_shutdown_timeout-new-in-v854) configuration item.

- Deprecated configuration items: [`region-compact-check-interval`](https://docs.pingcap.com/tidb/v8.5/tikv-configuration-file#region-compact-check-interval), [`region-compact-check-step`](https://docs.pingcap.com/tidb/v8.5/tikv-configuration-file#region-compact-check-step), [`region-compact-min-tombstones`](https://docs.pingcap.com/tidb/v8.5/tikv-configuration-file#region-compact-min-tombstones), [`region-compact-tombstones-percent`](https://docs.pingcap.com/tidb/v8.5/tikv-configuration-file#region-compact-tombstones-percent), [`region-compact-min-redundant-rows`](https://docs.pingcap.com/tidb/v8.5/tikv-configuration-file#region-compact-min-redundant-rows-new-in-v710), and [`region-compact-redundant-rows-percent`](https://docs.pingcap.com/tidb/v8.5/tikv-configuration-file#region-compact-redundant-rows-percent-new-in-v710).
- New configuration items: [`gc.auto-compaction.check-interval`](https://docs.pingcap.com/tidb/v8.5/tikv-configuration-file#check-interval-new-in-v757-and-v854), [`gc.auto-compaction.tombstone-num-threshold`](https://docs.pingcap.com/tidb/v8.5/tikv-configuration-file#tombstone-num-threshold-new-in-v757-and-v854), [`gc.auto-compaction.tombstone-percent-threshold`](https://docs.pingcap.com/tidb/v8.5/tikv-configuration-file#tombstone-percent-threshold-new-in-v757-and-v854), [`gc.auto-compaction.redundant-rows-threshold`](https://docs.pingcap.com/tidb/v8.5/tikv-configuration-file#redundant-rows-threshold-new-in-v757-and-v854), [`gc.auto-compaction.redundant-rows-percent-threshold`](https://docs.pingcap.com/tidb/v8.5/tikv-configuration-file#redundant-rows-percent-threshold-new-in-v757-and-v854), and [`gc.auto-compaction.bottommost-level-force`](https://docs.pingcap.com/tidb/v8.5/tikv-configuration-file#bottommost-level-force-new-in-v757-and-v854).

- Add a TiFlash configuration item [`flash.graceful_wait_shutdown_timeout`](https://docs.pingcap.com/tidb/v8.5/tiflash-configuration#graceful_wait_shutdown_timeout-new-in-v854), which controls the maximum wait time when shutting down a TiFlash server. The default value is `600` seconds. During this period, TiFlash continues running unfinished MPP tasks but does not accept new ones. If all running MPP tasks finish before this timeout, TiFlash shuts down immediately; otherwise, it is forcibly shut down after the wait time expires. [#10266](https://github.com/pingcap/tiflash/issues/10266) @[gengliqi](https://github.com/gengliqi)

Choose a reason for hiding this comment

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

low

This description is quite repetitive of the feature description earlier in the document. A more concise version would improve readability.

Suggested change
- Add a TiFlash configuration item [`flash.graceful_wait_shutdown_timeout`](https://docs.pingcap.com/tidb/v8.5/tiflash-configuration#graceful_wait_shutdown_timeout-new-in-v854), which controls the maximum wait time when shutting down a TiFlash server. The default value is `600` seconds. During this period, TiFlash continues running unfinished MPP tasks but does not accept new ones. If all running MPP tasks finish before this timeout, TiFlash shuts down immediately; otherwise, it is forcibly shut down after the wait time expires. [#10266](https://github.com/pingcap/tiflash/issues/10266) @[gengliqi](https://github.com/gengliqi)
- Add the [`flash.graceful_wait_shutdown_timeout`](https://docs.pingcap.com/tidb/v8.5/tiflash-configuration#graceful_wait_shutdown_timeout-new-in-v854) configuration item, which controls the maximum wait time when shutting down a TiFlash server. The default value is `600` seconds. During this period, TiFlash continues to run unfinished MPP tasks but rejects new ones. If all tasks finish before the timeout, TiFlash shuts down immediately; otherwise, it is forcibly shut down after the timeout expires. [#10266](https://github.com/pingcap/tiflash/issues/10266) @[gengliqi](https://github.com/gengliqi)


### MySQL compatibility

Starting from v8.5.4, TiDB aligns its behavior with MySQL when inserting data into a `DECIMAL` column: if the number of decimal places exceeds the column's defined scale, TiDB automatically truncates the extra digits and inserts the truncated data successfully, regardless of how many extra decimal places there are. In earlier TiDB versions, if the number of decimal places in the inserted `DECIMAL` value exceeded 72, the insertion fails and returns an error. For more information, see [Connect to TiDB using JDBC](https://docs.pingcap.com/tidb/v8.5/dev-guide-sample-application-java-jdbc#mysql-compatibility).

Choose a reason for hiding this comment

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

low

The phrasing could be slightly improved for clarity and conciseness. For example, "regardless of how many extra decimal places there are" can be shortened, and "the insertion fails and returns an error" is a bit redundant.

Suggested change
Starting from v8.5.4, TiDB aligns its behavior with MySQL when inserting data into a `DECIMAL` column: if the number of decimal places exceeds the column's defined scale, TiDB automatically truncates the extra digits and inserts the truncated data successfully, regardless of how many extra decimal places there are. In earlier TiDB versions, if the number of decimal places in the inserted `DECIMAL` value exceeded 72, the insertion fails and returns an error. For more information, see [Connect to TiDB using JDBC](https://docs.pingcap.com/tidb/v8.5/dev-guide-sample-application-java-jdbc#mysql-compatibility).
Starting from v8.5.4, TiDB aligns its behavior with MySQL when inserting data into a `DECIMAL` column: if the number of decimal places exceeds the column's defined scale, TiDB automatically truncates the extra digits and inserts the truncated data successfully, regardless of the number of extra decimal places. In earlier TiDB versions, if the number of decimal places in the inserted `DECIMAL` value exceeded 72, the insertion would fail with an error. For more information, see [Connect to TiDB using JDBC](https://docs.pingcap.com/tidb/v8.5/dev-guide-sample-application-java-jdbc#mysql-compatibility).

- Fix the issue that spilled files might not be fully deleted when the `Out Of Quota For Local Temporary Space` error is triggered [#63216](https://github.com/pingcap/tidb/issues/63216) @[xzhangxian1008](https://github.com/xzhangxian1008)
- Fix the issue that queries using regular expressions against `INFORMATION_SCHEMA` tables might return incorrect results [#62347](https://github.com/pingcap/tidb/issues/62347) @[River2000i](https://github.com/River2000i)
- Fix the issue that TiDB does not return an error when it fails to get a timestamp from PD [#58871](https://github.com/pingcap/tidb/issues/58871) @[joechenrh](https://github.com/joechenrh)
- Fix the issue that query results differ between the owner TiDB and non-owner TiDB instances during executing `MODIFY COLUMN` statements [#60264](https://github.com/pingcap/tidb/issues/60264) @[tangenta](https://github.com/tangenta)

Choose a reason for hiding this comment

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

low

The phrase "during executing" is grammatically awkward. "when executing" would be more natural.

Suggested change
- Fix the issue that query results differ between the owner TiDB and non-owner TiDB instances during executing `MODIFY COLUMN` statements [#60264](https://github.com/pingcap/tidb/issues/60264) @[tangenta](https://github.com/tangenta)
- Fix the issue that query results differ between the owner TiDB and non-owner TiDB instances when executing `MODIFY COLUMN` statements [#60264](https://github.com/pingcap/tidb/issues/60264) @[tangenta](https://github.com/tangenta)

- Fix the issue that `log truncate` might occur when file deletion fails [#63358](https://github.com/pingcap/tidb/issues/63358) @[YuJuncen](https://github.com/YuJuncen)
- Fix the issue that setting `--checksum` to `false` during backup might cause the `count` column in the `mysql.stats_meta` table to become `0` after restore [#60978](https://github.com/pingcap/tidb/issues/60978) @[Leavrth](https://github.com/Leavrth)
- Reduce the possibility of BR failing to restore data from S3-compatible storage services when the bandwidth limits on these services are enabled [#18846](https://github.com/tikv/tikv/issues/18846) @[kennytm](https://github.com/kennytm)
- Fix the issue that `log backup observer` might lose the observation on a Region, causing the log backup progress to fail to advance [#18243](https://github.com/tikv/tikv/issues/18243) @[Leavrth](https://github.com/Leavrth)

Choose a reason for hiding this comment

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

low

The phrase "lose the observation on a Region" is a bit unclear. Consider rephrasing to "stop observing a Region" for better clarity.

Suggested change
- Fix the issue that `log backup observer` might lose the observation on a Region, causing the log backup progress to fail to advance [#18243](https://github.com/tikv/tikv/issues/18243) @[Leavrth](https://github.com/Leavrth)
- Fix the issue that `log backup observer` might stop observing a Region, causing the log backup progress to fail to advance [#18243](https://github.com/tikv/tikv/issues/18243) @[Leavrth](https://github.com/Leavrth)

- Fix the issue that setting `--checksum` to `false` during backup might cause the `count` column in the `mysql.stats_meta` table to become `0` after restore [#60978](https://github.com/pingcap/tidb/issues/60978) @[Leavrth](https://github.com/Leavrth)
- Reduce the possibility of BR failing to restore data from S3-compatible storage services when the bandwidth limits on these services are enabled [#18846](https://github.com/tikv/tikv/issues/18846) @[kennytm](https://github.com/kennytm)
- Fix the issue that `log backup observer` might lose the observation on a Region, causing the log backup progress to fail to advance [#18243](https://github.com/tikv/tikv/issues/18243) @[Leavrth](https://github.com/Leavrth)
- Fix the issue that causes `restore point` creation to fail when backed-up tables include certain special schemas [#63663](https://github.com/pingcap/tidb/issues/63663) @[RidRisR](https://github.com/RidRisR)

Choose a reason for hiding this comment

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

low

The phrase "issue that causes ... to fail" is slightly wordy. It can be simplified for better readability.

Suggested change
- Fix the issue that causes `restore point` creation to fail when backed-up tables include certain special schemas [#63663](https://github.com/pingcap/tidb/issues/63663) @[RidRisR](https://github.com/RidRisR)
- Fix the issue that `restore point` creation fails when backed-up tables include certain special schemas [#63663](https://github.com/pingcap/tidb/issues/63663) @[RidRisR](https://github.com/RidRisR)

@qiancai
Copy link
Collaborator

qiancai commented Nov 27, 2025

/approve

@ti-chi-bot
Copy link

ti-chi-bot bot commented Nov 27, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qiancai

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

The pull request process is described here

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 Nov 27, 2025
@qiancai qiancai merged commit 373b77d into pingcap:release-8.5 Nov 27, 2025
7 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved lgtm size/L Denotes a PR that changes 100-499 lines, ignoring generated files. type/cherry-pick-for-release-8.5 This PR is cherry-picked to release-8.5 from a source PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants