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

server: ping the server to make sure the server is online to make CI stable #30338

Closed
wants to merge 3 commits into from

Conversation

djshow832
Copy link
Contributor

@djshow832 djshow832 commented Dec 2, 2021

What problem does this PR solve?

This PR might fix #30297, #30249, #30303, #30256, #30286, but I'm not very sure. It at least solves the test case mentioned in #30306 (comment)

Problem Summary:
In waitUntilServerCanConnect, sql.Open() doesn't actually indicate that the connection is established, so we need another db.Ping() to verify that.

What is changed and how it works?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

None

@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has not been approved.

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Dec 2, 2021
@ti-chi-bot ti-chi-bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Dec 2, 2021
@djshow832
Copy link
Contributor Author

/run-check_dev_2

2 similar comments
@djshow832
Copy link
Contributor Author

/run-check_dev_2

@djshow832
Copy link
Contributor Author

/run-check_dev_2

@djshow832 djshow832 changed the title server: add more logs to investigate CI errors server: ping the server to make sure the server is online to make CI stable Dec 2, 2021
@djshow832 djshow832 removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 2, 2021
@djshow832
Copy link
Contributor Author

I ran the CI 4 times and they all succeeded.

@djshow832 djshow832 marked this pull request as ready for review December 2, 2021 03:41
@hawkingrei
Copy link
Member

But It still has some problems. it is not related to Ping. It looks like this:

[2021-12-02T03:30:02.107Z] --- FAIL: TestCollateHashJoin2 (0.55s)
[2021-12-02T03:30:02.107Z]     testkit.go:91:
[2021-12-02T03:30:02.107Z]         	Error Trace:	testkit.go:91
[2021-12-02T03:30:02.107Z]         	            				integration_serial_test.go:482
[2021-12-02T03:30:02.107Z]         	Error:      	Received unexpected error:
[2021-12-02T03:30:02.107Z]         	            	[schema:1146]Table 'test.t1' doesn't exist
[2021-12-02T03:30:02.107Z]         	            	github.com/pingcap/errors.AddStack
[2021-12-02T03:30:02.107Z]         	            		/nfs/cache/mod/github.com/pingcap/errors@v0.11.5-0.20211009033009-93128226aaa3/errors.go:174
[2021-12-02T03:30:02.107Z]         	            	github.com/pingcap/errors.(*Error).GenWithStackByArgs
[2021-12-02T03:30:02.107Z]         	            		/nfs/cache/mod/github.com/pingcap/errors@v0.11.5-0.20211009033009-93128226aaa3/normalize.go:159
[2021-12-02T03:30:02.107Z]         	            	github.com/pingcap/tidb/infoschema.(*infoSchema).TableByName
[2021-12-02T03:30:02.107Z]         	            		/home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/infoschema/infoschema.go:189
[2021-12-02T03:30:02.107Z]         	            	github.com/pingcap/tidb/planner/core.(*preprocessor).tableByName
[2021-12-02T03:30:02.107Z]         	            		/home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/planner/core/preprocess.go:398
[2021-12-02T03:30:02.107Z]         	            	github.com/pingcap/tidb/planner/core.(*preprocessor).handleTableName
[2021-12-02T03:30:02.107Z]         	            		/home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/planner/core/preprocess.go:1421
[2021-12-02T03:30:02.107Z]         	            	github.com/pingcap/tidb/planner/core.(*preprocessor).Leave
[2021-12-02T03:30:02.107Z]         	            		/home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/planner/core/preprocess.go:499
[2021-12-02T03:30:02.107Z]         	            	github.com/pingcap/tidb/parser/ast.(*TableName).Accept
[2021-12-02T03:30:02.107Z]         	            		/home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/parser/ast/dml.go:439
[2021-12-02T03:30:02.107Z]         	            	github.com/pingcap/tidb/parser/ast.(*TableSource).Accept
[2021-12-02T03:30:02.107Z]         	            		/home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/parser/ast/dml.go:592
[2021-12-02T03:30:02.107Z]         	            	github.com/pingcap/tidb/parser/ast.(*Join).Accept
[2021-12-02T03:30:02.107Z]         	            		/home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/parser/ast/dml.go:234
[2021-12-02T03:30:02.107Z]         	            	github.com/pingcap/tidb/parser/ast.(*Join).Accept
[2021-12-02T03:30:02.107Z]         	            		/home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/parser/ast/dml.go:234
[2021-12-02T03:30:02.107Z]         	            	github.com/pingcap/tidb/parser/ast.(*TableRefsClause).Accept
[2021-12-02T03:30:02.107Z]         	            		/home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/parser/ast/dml.go:791
[2021-12-02T03:30:02.107Z]         	            	github.com/pingcap/tidb/parser/ast.(*SelectStmt).Accept
[2021-12-02T03:30:02.107Z]         	            		/home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/parser/ast/dml.go:1429
[2021-12-02T03:30:02.107Z]         	            	github.com/pingcap/tidb/planner/core.Preprocess
[2021-12-02T03:30:02.107Z]         	            		/home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/planner/core/preprocess.go:117
[2021-12-02T03:30:02.107Z]         	            	github.com/pingcap/tidb/executor.(*Compiler).Compile
[2021-12-02T03:30:02.107Z]         	            		/home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/executor/compiler.go:60
[2021-12-02T03:30:02.107Z]         	            	github.com/pingcap/tidb/session.(*session).ExecuteStmt
[2021-12-02T03:30:02.107Z]         	            		/home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/session/session.go:1560
[2021-12-02T03:30:02.107Z]         	            	github.com/pingcap/tidb/testkit.(*TestKit).Exec
[2021-12-02T03:30:02.107Z]         	            		/home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/testkit/testkit.go:145
[2021-12-02T03:30:02.107Z]         	            	github.com/pingcap/tidb/testkit.(*TestKit).MustQuery
[2021-12-02T03:30:02.107Z]         	            		/home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/testkit/testkit.go:90
[2021-12-02T03:30:02.107Z]         	            	github.com/pingcap/tidb/expression_test.TestCollateHashJoin2
[2021-12-02T03:30:02.108Z]         	            		/home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/expression/integration_serial_test.go:482
[2021-12-02T03:30:02.108Z]         	            	testing.tRunner
[2021-12-02T03:30:02.108Z]         	            		/usr/local/go/src/testing/testing.go:1193
[2021-12-02T03:30:02.108Z]         	            	runtime.goexit
[2021-12-02T03:30:02.108Z]         	            		/usr/local/go/src/runtime/asm_amd64.s:1371
[2021-12-02T03:30:02.108Z]         	Test:       	TestCollateHashJoin2
[2021-12-02T03:30:02.108Z]         	Messages:   	sql:select /*+ TIDB_HJ(t1, t2) */ * from t1, t2 where t1.v=t2.v order by t1.id, args:[]
[2021-12-02T03:30:02.128Z] --- FAIL: TestCollateMergeJoin2 (0.46s)
[2021-12-02T03:30:02.128Z]     testkit.go:91:
[2021-12-02T03:30:02.128Z]         	Error Trace:	testkit.go:91
[2021-12-02T03:30:02.128Z]         	            				integration_serial_test.go:520
[2021-12-02T03:30:02.128Z]         	Error:      	Received unexpected error:
[2021-12-02T03:30:02.128Z]         	            	[schema:1146]Table 'test.t1' doesn't exist
[2021-12-02T03:30:02.128Z]         	            	github.com/pingcap/errors.AddStack
[2021-12-02T03:30:02.128Z]         	            		/nfs/cache/mod/github.com/pingcap/errors@v0.11.5-0.20211009033009-93128226aaa3/errors.go:174
[2021-12-02T03:30:02.128Z]         	            	github.com/pingcap/errors.(*Error).GenWithStackByArgs
[2021-12-02T03:30:02.128Z]         	            		/nfs/cache/mod/github.com/pingcap/errors@v0.11.5-0.20211009033009-93128226aaa3/normalize.go:159
[2021-12-02T03:30:02.128Z]         	            	github.com/pingcap/tidb/infoschema.(*infoSchema).TableByName
[2021-12-02T03:30:02.128Z]         	            		/home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/infoschema/infoschema.go:189
[2021-12-02T03:30:02.128Z]         	            	github.com/pingcap/tidb/planner/core.(*preprocessor).tableByName
[2021-12-02T03:30:02.128Z]         	            		/home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/planner/core/preprocess.go:398
[2021-12-02T03:30:02.128Z]         	            	github.com/pingcap/tidb/planner/core.(*preprocessor).handleTableName
[2021-12-02T03:30:02.128Z]         	            		/home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/planner/core/preprocess.go:1421
[2021-12-02T03:30:02.128Z]         	            	github.com/pingcap/tidb/planner/core.(*preprocessor).Leave
[2021-12-02T03:30:02.128Z]         	            		/home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/planner/core/preprocess.go:499
[2021-12-02T03:30:02.128Z]         	            	github.com/pingcap/tidb/parser/ast.(*TableName).Accept
[2021-12-02T03:30:02.128Z]         	            		/home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/parser/ast/dml.go:439
[2021-12-02T03:30:02.128Z]         	            	github.com/pingcap/tidb/parser/ast.(*TableSource).Accept
[2021-12-02T03:30:02.128Z]         	            		/home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/parser/ast/dml.go:592
[2021-12-02T03:30:02.128Z]         	            	github.com/pingcap/tidb/parser/ast.(*Join).Accept
[2021-12-02T03:30:02.128Z]         	            		/home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/parser/ast/dml.go:234
[2021-12-02T03:30:02.128Z]         	            	github.com/pingcap/tidb/parser/ast.(*Join).Accept
[2021-12-02T03:30:02.128Z]         	            		/home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/parser/ast/dml.go:234
[2021-12-02T03:30:02.128Z]         	            	github.com/pingcap/tidb/parser/ast.(*TableRefsClause).Accept
[2021-12-02T03:30:02.128Z]         	            		/home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/parser/ast/dml.go:791
[2021-12-02T03:30:02.129Z]         	            	github.com/pingcap/tidb/parser/ast.(*SelectStmt).Accept
[2021-12-02T03:30:02.129Z]         	            		/home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/parser/ast/dml.go:1429
[2021-12-02T03:30:02.129Z]         	            	github.com/pingcap/tidb/planner/core.Preprocess
[2021-12-02T03:30:02.129Z]         	            		/home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/planner/core/preprocess.go:117
[2021-12-02T03:30:02.129Z]         	            	github.com/pingcap/tidb/executor.(*Compiler).Compile
[2021-12-02T03:30:02.129Z]         	            		/home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/executor/compiler.go:60
[2021-12-02T03:30:02.129Z]         	            	github.com/pingcap/tidb/session.(*session).ExecuteStmt
[2021-12-02T03:30:02.129Z]         	            		/home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/session/session.go:1560
[2021-12-02T03:30:02.129Z]         	            	github.com/pingcap/tidb/testkit.(*TestKit).Exec
[2021-12-02T03:30:02.129Z]         	            		/home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/testkit/testkit.go:145
[2021-12-02T03:30:02.129Z]         	            	github.com/pingcap/tidb/testkit.(*TestKit).MustQuery
[2021-12-02T03:30:02.129Z]         	            		/home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/testkit/testkit.go:90
[2021-12-02T03:30:02.129Z]         	            	github.com/pingcap/tidb/expression_test.TestCollateMergeJoin2
[2021-12-02T03:30:02.129Z]         	            		/home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/expression/integration_serial_test.go:520
[2021-12-02T03:30:02.129Z]         	            	testing.tRunner
[2021-12-02T03:30:02.129Z]         	            		/usr/local/go/src/testing/testing.go:1193
[2021-12-02T03:30:02.129Z]         	            	runtime.goexit
[2021-12-02T03:30:02.129Z]         	            		/usr/local/go/src/runtime/asm_amd64.s:1371
[2021-12-02T03:30:02.129Z]         	Test:       	TestCollateMergeJoin2
[2021-12-02T03:30:02.129Z]         	Messages:   	sql:select /*+ TIDB_SMJ(t1, t2) */ * from t1, t2 where t1.v=t2.v order by t1.id, args:[]
[2021-12-02T03:30:02.294Z] --- FAIL: TestNewCollationBinaryFlag (0.41s)
[2021-12-02T03:30:02.294Z]     integration_serial_test.go:953:
[2021-12-02T03:30:02.294Z]         	Error Trace:	integration_serial_test.go:953
[2021-12-02T03:30:02.294Z]         	Error:      	"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin" does not contain "CREATE TABLE `t` (\n  `a` varchar(10) DEFAULT NULL\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin"
[2021-12-02T03:30:02.294Z]         	Test:       	TestNewCollationBinaryFlag

@hawkingrei
Copy link
Member

I am trying it in #30306 by adding more Ping and setting some config.

@djshow832 djshow832 closed this Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IT Unstable case TestSumAvg
3 participants