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

executor: add lock keys duration metric #14194

Merged
merged 1 commit into from
Dec 24, 2019

Conversation

cfzjywxk
Copy link
Contributor

@cfzjywxk cfzjywxk commented Dec 23, 2019

What problem does this PR solve?

Cherry-pick #14189 to 3.0
maybe we just record the lock keys duration #14189, record the waited flag and duration in stmtctx(will be used in slow log)

What is changed and how it works?

Check List

Tests

  • Unit test

Code changes

Side effects

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation
  • Need to update the tidb-ansible repository

Release note

  • Write release note for bug-fix or new feature.

@coocood
Copy link
Member

coocood commented Dec 23, 2019

@cfzjywxk If we remove the check, optimistic transactions are recorded too, we will get too many near-zero values.

Copy link
Contributor

@lonng lonng left a comment

Choose a reason for hiding this comment

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

do we need update the gafana?

@coocood
Copy link
Member

coocood commented Dec 24, 2019

We need to store PessimisticLockWaited in StmtContext

@cfzjywxk
Copy link
Contributor Author

do we need update the gafana?

Yes it's needed

@cfzjywxk
Copy link
Contributor Author

@coocood @jackysp PTAL

@coocood
Copy link
Member

coocood commented Dec 24, 2019

LGTM

@coocood
Copy link
Member

coocood commented Dec 24, 2019

/run-unit-test

@cfzjywxk cfzjywxk requested a review from bb7133 December 24, 2019 11:52
Copy link
Member

@jackysp jackysp left a comment

Choose a reason for hiding this comment

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

LGTM

@jackysp
Copy link
Member

jackysp commented Dec 24, 2019

/merge

@sre-bot sre-bot added the status/can-merge Indicates a PR has been approved by a committer. label Dec 24, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Dec 24, 2019

/run-all-tests

@sre-bot sre-bot merged commit 1a32e51 into pingcap:release-3.0 Dec 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/execution SIG execution status/can-merge Indicates a PR has been approved by a committer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants