From b5f3aa01c9ccf9785c2de9af04248cd166574545 Mon Sep 17 00:00:00 2001 From: Ti Chi Robot Date: Tue, 5 Dec 2023 21:13:19 +0800 Subject: [PATCH] statistics: fix invaild asnyc_merge_global_stats (#49042) (#49060) close pingcap/tidb#49041 --- pkg/statistics/handle/globalstats/global_stats.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/pkg/statistics/handle/globalstats/global_stats.go b/pkg/statistics/handle/globalstats/global_stats.go index c769daff4f293..78ee277659bb5 100644 --- a/pkg/statistics/handle/globalstats/global_stats.go +++ b/pkg/statistics/handle/globalstats/global_stats.go @@ -134,16 +134,10 @@ func MergePartitionStats2GlobalStatsByTableID( } globalTableInfo := globalTable.Meta() - - worker, err := NewAsyncMergePartitionStats2GlobalStats(statsHandle, globalTableInfo, histIDs, is) - if err != nil { - return nil, errors.Trace(err) - } - err = worker.MergePartitionStats2GlobalStats(sc, opts, isIndex) + globalStats, err = MergePartitionStats2GlobalStats(sc, statsHandle, opts, is, globalTableInfo, isIndex, histIDs) if err != nil { return nil, errors.Trace(err) } - globalStats = worker.Result() if len(globalStats.MissingPartitionStats) > 0 { var item string if !isIndex {