TiDB Partition Ticket Collection Statistics Fail at the Merge Step

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

Original topic: tidb分区票收集统计在merge这一步fail

| username: zhanggame1

[TiDB Usage Environment] Production Environment / Testing / PoC
[TiDB Version]
[Reproduction Path] What operations were performed when the issue occurred
[Encountered Issue: Issue Phenomenon and Impact]
Why are there always 2 failures in the merge step of TiDB partition ticket collection statistics? This happens on both our primary and standby databases.

| username: 小龙虾爱大龙虾 | Original post link

Take a look at the error.

| username: zhanggame1 | Original post link

Screenshot error reason: illegal bucket order

| username: 小龙虾爱大龙虾 | Original post link

It seems like this bug should have been fixed in v7.5.0, but you’re still encountering the error.

| username: oceanzhang | Original post link

It should be a bug. Generally, it either doesn’t support it or throws an error. It won’t fail halfway through execution.

| username: zhanggame1 | Original post link

I think so too. The primary and standby databases are both version 7.5, and the same data is reporting errors.

| username: dba远航 | Original post link

It should be a bug.

| username: oceanzhang | Original post link

Version 7.5 should be a stable version.

| username: oceanzhang | Original post link

I don’t know why this error still occurs.

| username: zhanggame1 | Original post link

In the 7.6.0 version update notes, I saw the fix.

| username: zhanggame1 | Original post link

In the latest 7.6.0 version update notes, I saw the 48713 fix, which still existed in 7.5.0.
TiDB 7.6.0 Release Notes | PingCAP Documentation Center

| username: 小龙虾爱大龙虾 | Original post link

I see that it has been merged into version 7.5. Maybe a PR wasn’t fixed properly. :rofl:

commit 069631e2ecfedc000ffb92c67207bea81380f020 (HEAD, tag: v7.5.0)
Author: Ti Chi Robot <ti-community-prow-bot@tidb.io>
Date:   Fri Nov 24 13:35:42 2023 +0800

    *: fix wrong result when to concurrency merge global stats  (#48852) (#48864)
    
    close pingcap/tidb#48713
| username: zhanggame1 | Original post link

7.6.0 is really good. Previously, a merge global stats operation took 20 minutes and then reported an error, and the partition table statistics couldn’t be completed in a few days. Now, merge global stats is done in 1 minute.