Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkingrei committed Oct 12, 2023
1 parent 0d0ea77 commit f7f5288
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
3 changes: 1 addition & 2 deletions statistics/handle/handletest/globalstats/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ go_test(
"main_test.go",
],
flaky = True,
shard_count = 15,
shard_count = 14,
deps = [
"//config",
"//parser/model",
"//sessionctx",
"//statistics/handle",
"//testkit",
"//testkit/testsetup",
Expand Down
12 changes: 2 additions & 10 deletions statistics/handle/handletest/globalstats/globalstats_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1114,7 +1114,7 @@ func TestGlobalStats(t *testing.T) {
"└─TableFullScan 6.00 cop[tikv] table:t keep order:false"))
}

func testGlobalIndexStatistics(t *testing.T, analyzePartitionMergeConcurrency int) {
func TestGlobalIndexStatistics(t *testing.T) {
defer config.RestoreFunc()()
config.UpdateGlobal(func(conf *config.Config) {
conf.EnableGlobalIndex = true
Expand All @@ -1130,7 +1130,7 @@ func testGlobalIndexStatistics(t *testing.T, analyzePartitionMergeConcurrency in

for i, version := range []string{"1", "2"} {
tk.MustExec("set @@session.tidb_analyze_version = " + version)
tk.MustExec(fmt.Sprintf("set @@global.tidb_merge_partition_stats_concurrency=%d", analyzePartitionMergeConcurrency))

// analyze table t
tk.MustExec("drop table if exists t")
if i != 0 {
Expand Down Expand Up @@ -1192,11 +1192,3 @@ func testGlobalIndexStatistics(t *testing.T, analyzePartitionMergeConcurrency in
"└─IndexRangeScan_11 4.00 cop[tikv] table:t, index:idx(b) range:[-inf,16), keep order:true"))
}
}

func TestGlobalIndexStatistics(t *testing.T) {
testGlobalIndexStatistics(t, 1)
}

func TestGlobalIndexStatisticsWithAnalyzePartitionMergeConcurrency(t *testing.T) {
testGlobalIndexStatistics(t, 3)
}

0 comments on commit f7f5288

Please sign in to comment.