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: log trace fields in CoprocessorDAGHandler #46506

Merged
merged 1 commit into from
Sep 4, 2023

Conversation

lcwangchao
Copy link
Collaborator

What problem does this PR solve?

Issue Number: close #46505, ref #46071

What is changed and how it works?

We need to log connection_id and session_alias to tracing operations across the node. This PR add these two fields in tidb coprocessor context. And then the tidb coprocessor's log will include tracing fields like:

[2023/08/30 16:23:03.819 +08:00] [DEBUG] [coprocessor.go:73] ["handle coprocessor request"] [conn=2885681156] [session_alias=alias123]

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

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 30, 2023
@lcwangchao lcwangchao force-pushed the session_alias_tidb_corp branch from 0a77deb to 2751dae Compare August 30, 2023 08:32
@codecov
Copy link

codecov bot commented Aug 30, 2023

Codecov Report

Merging #46506 (fbd1637) into master (f516603) will decrease coverage by 1.4370%.
Report is 53 commits behind head on master.
The diff coverage is 64.2857%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #46506        +/-   ##
================================================
- Coverage   73.3629%   71.9259%   -1.4370%     
================================================
  Files          1303       1338        +35     
  Lines        394540     409193     +14653     
================================================
+ Hits         289446     294316      +4870     
- Misses        86687      96304      +9617     
- Partials      18407      18573       +166     
Flag Coverage Δ
integration 26.1667% <7.1428%> (?)
unit 73.3514% <64.2857%> (-0.0115%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 54.0444% <ø> (ø)
parser 84.9772% <ø> (-0.0975%) ⬇️
br 46.3843% <ø> (-5.9685%) ⬇️

@lcwangchao lcwangchao force-pushed the session_alias_tidb_corp branch from 2751dae to fbd1637 Compare August 31, 2023 03:21
Copy link
Member

@bb7133 bb7133 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 approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Aug 31, 2023
@ti-chi-bot
Copy link

ti-chi-bot bot commented Sep 4, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bb7133, hawkingrei

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

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Sep 4, 2023
@ti-chi-bot
Copy link

ti-chi-bot bot commented Sep 4, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-08-31 03:38:24.443309651 +0000 UTC m=+1984668.992325638: ☑️ agreed by bb7133.
  • 2023-09-04 01:38:48.634214768 +0000 UTC m=+2323093.183230758: ☑️ agreed by hawkingrei.

@hawkingrei
Copy link
Member

/test all

@lcwangchao
Copy link
Collaborator Author

/retest

2 similar comments
@hawkingrei
Copy link
Member

/retest

@lcwangchao
Copy link
Collaborator Author

/retest

@hawkingrei
Copy link
Member

/test all

1 similar comment
@hawkingrei
Copy link
Member

/test all

@ti-chi-bot ti-chi-bot bot merged commit 8b9a90d into pingcap:master Sep 4, 2023
@lcwangchao lcwangchao deleted the session_alias_tidb_corp branch September 5, 2023 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

logs in CoprocessorDAGHandler should include tracing fields
3 participants