Experts, what does the "21 ranges" in the log "total backup ranges: 21, total success: 21, total failed: 0" at the end of the br backup mean? What does it refer to?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 大佬们这个br备份结尾这个日志total backup ranges: 21, total success: 21, total failed: 0 这个21 ranges 是个什么意思?指啥

| username: jaybing926

[TiDB Usage Environment] Production Environment / Testing / Poc
[TiDB Version] v4.0.9
[Reproduction Path] What operations were performed that caused the issue
[Encountered Issue: Issue Phenomenon and Impact]
Experts, what does this log at the end of the br backup mean: total backup ranges: 21, total success: 21, total failed: 0?
What does this 21 ranges refer to?
For similar data, it was 109 in the old cluster, but it is 21 in the new cluster.

[Resource Configuration]
[Attachments: Screenshots/Logs/Monitoring]

| username: Billmay表妹 | Original post link

The “ranges” here refers to the number of key ranges backed up in the backup task. After the backup task is completed, BR will output the backup results, where “total backup ranges” indicates the total number of key ranges backed up in the task, “total success” indicates the number of key ranges successfully backed up, and “total failed” indicates the number of key ranges that failed to back up. In the log you provided, “total backup ranges” is 21, “total success” is 21, and “total failed” is 0, indicating that all key ranges in the backup task were successfully backed up.

| username: hey-hoho | Original post link

The BR client leverages TiDB’s interface to calculate the ranges that need to be backed up based on the databases and tables specified by the user. The calculation is based on:

  1. Generating ranges based on all data keys for each table (all keys with the t{table_id}_r prefix).
  2. Generating ranges based on all index keys for each index (all keys with the t{table_id}_i{index_id} prefix).
  3. If a table has partitions (which means it may have multiple table IDs), generating ranges for each partition according to the above rules.

To achieve maximum parallelism, the BR client sends backup requests for these ranges to all TiKV nodes in parallel.

Referenced from: 专栏 - 备份的 “算子下推”:TiDB BR 简介 | TiDB 社区

| username: jaybing926 | Original post link

Cousin, what does this key range mean? I don’t quite understand.
I have roughly the same amount of data, the new cluster has 21, the old cluster has 109. Is this normal?

| username: jaybing926 | Original post link

For a similar amount of data, the new cluster has 21 while the old cluster has 109. Is this normal? My foundation is too weak to understand it well. :pensive:

I used BR for full backup and TiCDC to synchronize data from the old cluster to the new cluster.

| username: hey-hoho | Original post link

Is the table structure the same? The number of tables might have an impact.

| username: jaybing926 | Original post link

Cleaned up many unused tables in the new cluster. That’s why it has decreased, thanks a lot~!!

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.