Error in partitioned table analyze when merging global stats for test.win_ticket columns: illegal bucket order

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

Original topic: 分区表analyze在 merge global stats for test.win_ticket columns报错 illegal bucket order

| username: zhanggame1

【TiDB Version】7.5.0
【Bug Impact】
The partition table statistics are very slow and frequently fail when executing automatic partition statistics, specifically at the step “merge global stats for test.win_ticket columns,” with the error message “illegal bucket order.”

The cluster uses TiCDC for primary and standby replication, both running version 7.5. Each instance’s automatic analysis also shows the above error.

Manually running analyze win_ticket also results in the same error. Detailed logs can be found in the attached Excel file.
mysql.analyze_jobs.xlsx (135.2 KB)

In the past few days, I have tested and adjusted the following parameters:
tidb_auto_analyze_partition_batch_size=100
global tidb_merge_partition_stats_concurrency=5

| username: 有猫万事足 | Original post link

It should be this issue. It looks like it has already been fixed.
The comment specifically mentions:

analyze 8192 partitions table with single session job also encountered this error

This fits your usage scenario very well.

This fix has also been automated cherry-picked to 7.5.

Any x.x.0 version after 7.5 or 7.5.1 once released will include the fix for this issue.

| username: zhanggame1 | Original post link

Thank you, I’ll wait for the update.

| username: zhanggame1 | Original post link

Confirmed as bug48713. It was fixed in version 7.6.0.

  • Fixed an issue where an error might occur when concurrently merging global statistics of partitioned tables #48713 @hawkingrei

Tested in version 7.6.0 and did not encounter the illegal bucket order error.

| username: system | Original post link

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