Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testStatsSuite.TestAnalyzeGlobalStatsWithOpts & testStatsSuite.TestAnalyzeGlobalStatsWithOpts2 failed when make gotest #27328

Closed
purelind opened this issue Aug 18, 2021 · 6 comments · Fixed by #27734 or #30576
Assignees
Labels
severity/major sig/planner SIG: Planner type/bug The issue is confirmed as a bug.

Comments

@purelind
Copy link
Contributor

Bug Report

make gotest
https://ci.pingcap.net/blue/organizations/jenkins/tidb_ghpr_coverage/detail/tidb_ghpr_coverage/138/pipeline/

[2021-08-18T06:21:01.447Z] 2021/08/18 14:21:01 FAIL: handle_test.go:917: testStatsSuite.TestAnalyzeGlobalStatsWithOpts
[2021-08-18T06:21:01.447Z] 2021/08/18 14:21:01 
[2021-08-18T06:21:01.447Z] 2021/08/18 14:21:01 handle_test.go:948:
[2021-08-18T06:21:01.447Z] 2021/08/18 14:21:01     s.checkForGlobalStatsWithOpts(c, tk, "test_gstats_opt", "p1", ca.topn, ca.buckets)
[2021-08-18T06:21:01.447Z] 2021/08/18 14:21:01 handle_test.go:912:
[2021-08-18T06:21:01.447Z] 2021/08/18 14:21:01     // since the hist-building algorithm doesn't stipulate the final bucket number to be equal to the expected number exactly,
[2021-08-18T06:21:01.447Z] 2021/08/18 14:21:01     // we have to check the results by a range here.
[2021-08-18T06:21:01.447Z] 2021/08/18 14:21:01     c.Assert(numBuckets >= buckets-delta, IsTrue)

[2021-08-18T06:21:01.447Z] 2021/08/18 14:21:01 ... obtained bool = false


[2021-08-18T06:21:01.447Z] 2021/08/18 14:21:01 ----------------------------------------------------------------------
[2021-08-18T06:21:01.447Z] 2021/08/18 14:21:01 FAIL: handle_test.go:956: testStatsSuite.TestAnalyzeGlobalStatsWithOpts2
[2021-08-18T06:21:01.447Z] 2021/08/18 14:21:01 
[2021-08-18T06:21:01.447Z] 2021/08/18 14:21:01 handle_test.go:967:
[2021-08-18T06:21:01.447Z] 2021/08/18 14:21:01     s.checkForGlobalStatsWithOpts(c, tk, "test_gstats_opt2", "p1", 1, 50)
[2021-08-18T06:21:01.447Z] 2021/08/18 14:21:01 handle_test.go:912:
[2021-08-18T06:21:01.447Z] 2021/08/18 14:21:01     // since the hist-building algorithm doesn't stipulate the final bucket number to be equal to the expected number exactly,
[2021-08-18T06:21:01.447Z] 2021/08/18 14:21:01     // we have to check the results by a range here.
[2021-08-18T06:21:01.447Z] 2021/08/18 14:21:01     c.Assert(numBuckets >= buckets-delta, IsTrue)
[2021-08-18T06:21:01.447Z] 2021/08/18 14:21:01 ... obtained bool = false
@github-actions
Copy link

github-actions bot commented Sep 6, 2021

Please check whether the issue should be labeled with 'affects-x.y' or 'backport-x.y.z',
and then remove 'needs-more-info' label.

@ekexium
Copy link
Contributor

ekexium commented Sep 15, 2021

TestAnalyzeGlobalStatsWithOpts2 hasn't been fixed and is still unstable.

@unconsolable
Copy link
Contributor

Another occurrence https://ci.pingcap.net/blue/organizations/jenkins/tidb_ghpr_check_2/detail/tidb_ghpr_check_2/35312/pipeline/62/

[2021-09-23T16:30:32.555Z] FAIL: handle_test.go:917: testSerialStatsSuite.TestAnalyzeGlobalStatsWithOpts
[2021-09-23T16:30:32.555Z] 
[2021-09-23T16:30:32.555Z] handle_test.go:948:
[2021-09-23T16:30:32.555Z]     s.checkForGlobalStatsWithOpts(c, tk, "test_gstats_opt", "p1", ca.topn, ca.buckets)
[2021-09-23T16:30:32.555Z] handle_test.go:908:
[2021-09-23T16:30:32.555Z]     c.Assert(len(tk.MustQuery(fmt.Sprintf("show stats_topn where table_name='%v' and partition_name='%v' and is_index=%v", t, p, isIdx)).Rows()), Equals, topn)
[2021-09-23T16:30:32.555Z] ... obtained int = 0
[2021-09-23T16:30:32.555Z] ... expected int = 1
[2021-09-23T16:30:32.555Z] 
[2021-09-23T16:30:32.555Z] OOPS: 114 passed, 1 skipped, 1 FAILED

@tiancaiamao
Copy link
Contributor

A new occurrence in #30066

https://ci.pingcap.net/blue/organizations/jenkins/tidb_ghpr_check_2/detail/tidb_ghpr_check_2/49047/pipeline

[2021-11-30T02:29:27.292Z] FAIL: handle_test.go:921: testSerialStatsSuite.TestAnalyzeGlobalStatsWithOpts
[2021-11-30T02:29:27.292Z] 
[2021-11-30T02:29:27.292Z] handle_test.go:952:
[2021-11-30T02:29:27.292Z]     s.checkForGlobalStatsWithOpts(c, tk, "test_gstats_opt", "p1", ca.topn, ca.buckets)
[2021-11-30T02:29:27.292Z] handle_test.go:916:
[2021-11-30T02:29:27.292Z]     // since the hist-building algorithm doesn't stipulate the final bucket number to be equal to the expected number exactly,
[2021-11-30T02:29:27.292Z]     // we have to check the results by a range here.
[2021-11-30T02:29:27.292Z]     c.Assert(numBuckets, GreaterEqual, buckets-delta)
[2021-11-30T02:29:27.292Z] ... compare_one int = 0
[2021-11-30T02:29:27.292Z] ... compare_two int = 9

@tiancaiamao tiancaiamao reopened this Nov 30, 2021
@qw4990
Copy link
Contributor

qw4990 commented Dec 9, 2021

All failed cases are caused by numBuckets or numTopN is 0, so it seems the statistics is not loaded after analyzing.

@github-actions
Copy link

github-actions bot commented Dec 9, 2021

Please check whether the issue should be labeled with 'affects-x.y' or 'fixes-x.y.z', and then remove 'needs-more-info' label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/major sig/planner SIG: Planner type/bug The issue is confirmed as a bug.
Projects
None yet
7 participants