Skip to content

coprocessor: add SQL statement tracing in tikv slow log#15514

Merged
ti-chi-bot[bot] merged 3 commits intotikv:masterfrom
lcwangchao:session_alias
Sep 6, 2023
Merged

coprocessor: add SQL statement tracing in tikv slow log#15514
ti-chi-bot[bot] merged 3 commits intotikv:masterfrom
lcwangchao:session_alias

Conversation

@lcwangchao
Copy link
Contributor

@lcwangchao lcwangchao commented Sep 5, 2023

What is changed and how it works?

Issue Number: Close #15513

coprocessor: add SQL statement tracing in tikv slow log

new entries connection_id and session_alias will be added to slow log:

[2023/09/05 15:09:24.768 +08:00] [INFO] [tracker.rs:269] [slow-query] [perf_stats.internal_delete_skipped_count=0] [perf_stats.internal_key_skipped_count=9184] [perf_stats.block_read_byte=28635] [perf_stats.block_read_count=39] [perf_stats.block_cache_hit_count=5] [scan.range.first="Some(start: 7480000000000000F35F728000000000002E4000 end: 7480000000000000F35F7280000000000C4979)"] [scan.ranges=1] [scan.total=9185] [scan.processed_size=1175552] [scan.processed=9184] [scan.is_desc=false] [tag=select] [table_id=243] [txn_start_ts=444045135633973251] [total_suspend_time=2.459µs] [total_process_time=3.577208ms] [handler_build_time=10.375µs] [wait_time.snapshot=8.75µs] [wait_time.schedule=10.416µs] [wait_time=19.166µs] [total_lifetime=3.610125ms] [remote_host=ipv4:127.0.0.1:61687] [region_id=18007] [session_alias=alias123] [connection_id=2172649476]

Check List

Tests

  • No code

Release note

coprocessor: add SQL statement tracing in tikv slow log

Signed-off-by: Chao Wang <cclcwangchao@hotmail.com>
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Sep 5, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • gengliqi
  • wshwsh12

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.

Details

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 bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. contribution This PR is from a community contributor. first-time-contributor Indicates that the PR was contributed by an external member and is a first-time contributor. labels Sep 5, 2023
@ti-chi-bot ti-chi-bot bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Sep 5, 2023
Copy link
Member

@gengliqi gengliqi 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 ti-chi-bot bot added the status/LGT1 Indicates that a PR has LGTM 1. label Sep 5, 2023
@ti-chi-bot ti-chi-bot bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Sep 6, 2023
@lcwangchao
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Sep 6, 2023

@lcwangchao: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

Details

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
Contributor

ti-chi-bot bot commented Sep 6, 2023

@lcwangchao: /merge is only allowed for the committers, you can assign this pull request to the committer in list by filling /assign @committer in the comment to help merge this pull request.

Details

In response to this:

/merge

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.

@wshwsh12
Copy link
Contributor

wshwsh12 commented Sep 6, 2023

/merge

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Sep 6, 2023

@wshwsh12: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

Details

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
Contributor

ti-chi-bot bot commented Sep 6, 2023

@wshwsh12: /merge is only allowed for the committers, you can assign this pull request to the committer in list by filling /assign @committer in the comment to help merge this pull request.

Details

In response to this:

/merge

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.

@gengliqi
Copy link
Member

gengliqi commented Sep 6, 2023

/merge

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Sep 6, 2023

@gengliqi: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

Details

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
Contributor

ti-chi-bot bot commented Sep 6, 2023

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

DetailsCommit hash: 49ecc5e

@ti-chi-bot ti-chi-bot bot added the status/can-merge Indicates a PR has been approved by a committer. label Sep 6, 2023
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Sep 6, 2023

@lcwangchao: Your PR was out of date, I have automatically updated it for you.

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

Details

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 ti-chi-bot bot merged commit 1abc220 into tikv:master Sep 6, 2023
@ti-chi-bot ti-chi-bot bot added this to the Pool milestone Sep 6, 2023
@lcwangchao lcwangchao deleted the session_alias branch September 6, 2023 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution This PR is from a community contributor. first-time-contributor Indicates that the PR was contributed by an external member and is a first-time contributor. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

trace SQL stmt in coprocessor slow log

3 participants