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

*: upgrade client-go to fix pessimistic write-conflict #25984

Conversation

youjiali1995
Copy link
Contributor

Signed-off-by: youjiali1995 zlwgx1023@gmail.com

What problem does this PR solve?

Issue Number: close #25964

Problem Summary:

What is changed and how it works?

Proposal: xxx

What's Changed:

Upgrade client-go.

Related changes

Check List

Tests

  • Unit test

Side effects

Release note

  • Fix the issue that committing pessimistic transactions may report write-conflict errors.

Signed-off-by: youjiali1995 <zlwgx1023@gmail.com>
@ti-chi-bot ti-chi-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jul 6, 2021
@youjiali1995 youjiali1995 added sig/transaction SIG:Transaction and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 6, 2021
@youjiali1995 youjiali1995 added the type/bugfix This PR fixes a bug. label Jul 6, 2021
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jul 6, 2021
Copy link
Contributor

@cfzjywxk cfzjywxk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@ti-chi-bot
Copy link
Member

@cfzjywxk: Please use GitHub review feature instead of /lgtm [cancel] when you want to submit review to the pull request.
For how to use GitHub review feature, see also this document provided by GitHub.

For the reason we drop support to the commands, see also this page.
This reply is being used as a temporary reply during the migration of review process and will be removed on July 1st.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • cfzjywxk
  • sticnarf

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 status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jul 6, 2021
@youjiali1995
Copy link
Contributor Author

[2021-07-06T05:45:28.230Z] ----------------------------------------------------------------------
[2021-07-06T05:45:28.230Z] PANIC: db_test.go:3488: testDBSuite2.TestAddNotNullColumn
[2021-07-06T05:45:28.230Z] 
[2021-07-06T05:45:28.230Z] ... Panic: runtime error: index out of range [2] with length 2 (PC=0x10FC5D8)
[2021-07-06T05:45:28.230Z] 
[2021-07-06T05:45:28.230Z] /usr/local/go/src/runtime/panic.go:965
[2021-07-06T05:45:28.230Z]   in gopanic
[2021-07-06T05:45:28.230Z] /home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/executor/adapter.go:332
[2021-07-06T05:45:28.230Z]   in ExecStmt.Exec.func1
[2021-07-06T05:45:28.230Z] /usr/local/go/src/runtime/panic.go:971
[2021-07-06T05:45:28.230Z]   in gopanic
[2021-07-06T05:45:28.230Z] /usr/local/go/src/runtime/panic.go:88
[2021-07-06T05:45:28.230Z]   in goPanicIndex
[2021-07-06T05:45:28.230Z] /home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/planner/core/logical_plan_builder.go:4610
[2021-07-06T05:45:28.230Z]   in CheckUpdateList
[2021-07-06T05:45:28.230Z] /home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/executor/builder.go:1905
[2021-07-06T05:45:28.230Z]   in executorBuilder.buildUpdate
[2021-07-06T05:45:28.230Z] /home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/executor/builder.go:199
[2021-07-06T05:45:28.230Z]   in executorBuilder.build
[2021-07-06T05:45:28.230Z] /home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/executor/adapter.go:799
[2021-07-06T05:45:28.230Z]   in ExecStmt.buildExecutor
[2021-07-06T05:45:28.230Z] /home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/executor/adapter.go:380
[2021-07-06T05:45:28.230Z]   in ExecStmt.Exec
[2021-07-06T05:45:28.230Z] /home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/session/session.go:1636
[2021-07-06T05:45:28.230Z]   in runStmt
[2021-07-06T05:45:28.230Z] /home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/session/session.go:1531
[2021-07-06T05:45:28.230Z]   in session.ExecuteStmt
[2021-07-06T05:45:28.230Z] /home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/util/testkit/testkit.go:170
[2021-07-06T05:45:28.230Z]   in TestKit.Exec
[2021-07-06T05:45:28.230Z] db_test.go:3507
[2021-07-06T05:45:28.230Z]   in testDBSuite2.TestAddNotNullColumn
[2021-07-06T05:45:28.230Z] /usr/local/go/src/reflect/value.go:337
[2021-07-06T05:45:28.230Z]   in Value.Call
[2021-07-06T05:45:28.230Z] /nfs/cache/mod/github.com/pingcap/check@v0.0.0-20200212061837-5e12011dc712/check.go:850
[2021-07-06T05:45:28.230Z]   in suiteRunner.forkTest.func1
[2021-07-06T05:45:28.230Z] /nfs/cache/mod/github.com/pingcap/check@v0.0.0-20200212061837-5e12011dc712/check.go:739
[2021-07-06T05:45:28.230Z]   in suiteRunner.forkCall.func1
[2021-07-06T05:45:28.230Z] /usr/local/go/src/runtime/asm_amd64.s:1371
[2021-07-06T05:45:28.230Z]   in goexit

@youjiali1995
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: cb8df71

@ti-chi-bot ti-chi-bot added status/can-merge Indicates a PR has been approved by a committer. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 6, 2021
@ti-chi-bot ti-chi-bot merged commit 2ce464b into pingcap:master Jul 6, 2021
@sticnarf
Copy link
Contributor

sticnarf commented Jul 6, 2021

[2021-07-06T05:45:28.230Z] ----------------------------------------------------------------------
[2021-07-06T05:45:28.230Z] PANIC: db_test.go:3488: testDBSuite2.TestAddNotNullColumn
[2021-07-06T05:45:28.230Z] 
[2021-07-06T05:45:28.230Z] ... Panic: runtime error: index out of range [2] with length 2 (PC=0x10FC5D8)
[2021-07-06T05:45:28.230Z] 
[2021-07-06T05:45:28.230Z] /usr/local/go/src/runtime/panic.go:965
[2021-07-06T05:45:28.230Z]   in gopanic
[2021-07-06T05:45:28.230Z] /home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/executor/adapter.go:332
[2021-07-06T05:45:28.230Z]   in ExecStmt.Exec.func1
[2021-07-06T05:45:28.230Z] /usr/local/go/src/runtime/panic.go:971
[2021-07-06T05:45:28.230Z]   in gopanic
[2021-07-06T05:45:28.230Z] /usr/local/go/src/runtime/panic.go:88
[2021-07-06T05:45:28.230Z]   in goPanicIndex
[2021-07-06T05:45:28.230Z] /home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/planner/core/logical_plan_builder.go:4610
[2021-07-06T05:45:28.230Z]   in CheckUpdateList
[2021-07-06T05:45:28.230Z] /home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/executor/builder.go:1905
[2021-07-06T05:45:28.230Z]   in executorBuilder.buildUpdate
[2021-07-06T05:45:28.230Z] /home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/executor/builder.go:199
[2021-07-06T05:45:28.230Z]   in executorBuilder.build
[2021-07-06T05:45:28.230Z] /home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/executor/adapter.go:799
[2021-07-06T05:45:28.230Z]   in ExecStmt.buildExecutor
[2021-07-06T05:45:28.230Z] /home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/executor/adapter.go:380
[2021-07-06T05:45:28.230Z]   in ExecStmt.Exec
[2021-07-06T05:45:28.230Z] /home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/session/session.go:1636
[2021-07-06T05:45:28.230Z]   in runStmt
[2021-07-06T05:45:28.230Z] /home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/session/session.go:1531
[2021-07-06T05:45:28.230Z]   in session.ExecuteStmt
[2021-07-06T05:45:28.230Z] /home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/util/testkit/testkit.go:170
[2021-07-06T05:45:28.230Z]   in TestKit.Exec
[2021-07-06T05:45:28.230Z] db_test.go:3507
[2021-07-06T05:45:28.230Z]   in testDBSuite2.TestAddNotNullColumn
[2021-07-06T05:45:28.230Z] /usr/local/go/src/reflect/value.go:337
[2021-07-06T05:45:28.230Z]   in Value.Call
[2021-07-06T05:45:28.230Z] /nfs/cache/mod/github.com/pingcap/check@v0.0.0-20200212061837-5e12011dc712/check.go:850
[2021-07-06T05:45:28.230Z]   in suiteRunner.forkTest.func1
[2021-07-06T05:45:28.230Z] /nfs/cache/mod/github.com/pingcap/check@v0.0.0-20200212061837-5e12011dc712/check.go:739
[2021-07-06T05:45:28.230Z]   in suiteRunner.forkCall.func1
[2021-07-06T05:45:28.230Z] /usr/local/go/src/runtime/asm_amd64.s:1371
[2021-07-06T05:45:28.230Z]   in goexit

I meet this panic in real workloads. So open #25997 for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/transaction SIG:Transaction size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Report write-conflict error in pessimistic transactions
4 participants