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

sessionctx: add optimization-time and wait-TS-time into the slow log #17869

Merged
merged 3 commits into from
Jun 10, 2020

Conversation

qw4990
Copy link
Contributor

@qw4990 qw4990 commented Jun 9, 2020

What problem does this PR solve?

Issue Number: related to #17557

Problem Summary: add optimization-time and wait-TS-time into the slow log

What is changed and how it works?

One step to resolve #17557.
Add optimization-time and wait-TS-time into the slow log.

Check List

Tests

  • Unit test

Release note

  • add optimization-time and wait-TS-time into the slow log

@qw4990
Copy link
Contributor Author

qw4990 commented Jun 9, 2020

/run-unit-test

@codecov
Copy link

codecov bot commented Jun 9, 2020

Codecov Report

Merging #17869 into master will decrease coverage by 0.1804%.
The diff coverage is 100.0000%.

@@               Coverage Diff                @@
##             master     #17869        +/-   ##
================================================
- Coverage   79.6139%   79.4335%   -0.1805%     
================================================
  Files           525        524         -1     
  Lines        142946     141585      -1361     
================================================
- Hits         113805     112466      -1339     
- Misses        19997      20019        +22     
+ Partials       9144       9100        -44     

@github-actions github-actions bot added sig/sql-infra SIG: SQL Infra sig/execution SIG execution sig/planner SIG: Planner labels Jun 9, 2020
txn, err := b.ctx.Txn(true)
b.ctx.GetSessionVars().DurationWaitTS = time.Since(begin)
Copy link
Contributor

Choose a reason for hiding this comment

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

Put this into ctx.Txn will more accuracy? maybe already active the transaction before here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated. PTAL @crazycs520 .

Copy link
Contributor

@crazycs520 crazycs520 left a comment

Choose a reason for hiding this comment

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

REST LGTM

Copy link
Contributor

@Reminiscent Reminiscent left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@crazycs520 crazycs520 left a comment

Choose a reason for hiding this comment

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

LGTM

@qw4990 qw4990 added the status/can-merge Indicates a PR has been approved by a committer. label Jun 9, 2020
@sre-bot
Copy link
Contributor

sre-bot commented Jun 9, 2020

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Jun 9, 2020

@qw4990 merge failed.

@qw4990
Copy link
Contributor Author

qw4990 commented Jun 9, 2020

/run-common-test

3 similar comments
@qw4990
Copy link
Contributor Author

qw4990 commented Jun 9, 2020

/run-common-test

@qw4990
Copy link
Contributor Author

qw4990 commented Jun 9, 2020

/run-common-test

@qw4990
Copy link
Contributor Author

qw4990 commented Jun 9, 2020

/run-common-test

@qw4990
Copy link
Contributor Author

qw4990 commented Jun 10, 2020

/run-all-tests

@qw4990
Copy link
Contributor Author

qw4990 commented Jun 10, 2020

/run-integration-copr-test

@ti-srebot
Copy link
Contributor

cherry pick to release-4.0 in PR #22918

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/session sig/execution SIG execution sig/planner SIG: Planner sig/sql-infra SIG: SQL Infra 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.

Add more information in slow logs to help analyze slow queries
5 participants