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

statistics: add some key info in sync load timeout log #49630

Merged
merged 2 commits into from
Dec 20, 2023

Conversation

elsa0520
Copy link
Contributor

@elsa0520 elsa0520 commented Dec 20, 2023

What problem does this PR solve?

Issue Number: close #49631

Problem Summary:

What changed and how does it work?

Add table id in timeout sync load log

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

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 do-not-merge/needs-linked-issue do-not-merge/needs-tests-checked release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed do-not-merge/needs-linked-issue do-not-merge/needs-tests-checked labels Dec 20, 2023
@elsa0520
Copy link
Contributor Author

/cherry-pick release-6.5

@ti-chi-bot
Copy link
Member

@elsa0520: once the present PR merges, I will cherry-pick it on top of release-6.5 in the new PR and assign it to you.

In response to this:

/cherry-pick release-6.5

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 added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Dec 20, 2023
Copy link

codecov bot commented Dec 20, 2023

Codecov Report

Merging #49630 (522b123) into master (36251d6) will increase coverage by 0.4792%.
Report is 3 commits behind head on master.
The diff coverage is 0.0000%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #49630        +/-   ##
================================================
+ Coverage   70.9799%   71.4592%   +0.4792%     
================================================
  Files          1368       1423        +55     
  Lines        398711     416468     +17757     
================================================
+ Hits         283005     297605     +14600     
- Misses        95935     100064      +4129     
+ Partials      19771      18799       -972     
Flag Coverage Δ
integration 43.8980% <0.0000%> (?)
unit 70.9799% <ø> (-0.0001%) ⬇️

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

Components Coverage Δ
dumpling 53.9663% <ø> (ø)
parser ∅ <ø> (∅)
br 47.3574% <ø> (-5.5252%) ⬇️

@@ -168,7 +168,9 @@ func (c *Column) IsInvalid(
if (!c.IsStatsInitialized() || c.IsLoadNeeded()) && stmtctx != nil {
if stmtctx.StatsLoad.Timeout > 0 {
logutil.BgLogger().Warn("Hist for column should already be loaded as sync but not found.",
zap.String(strconv.FormatInt(c.Info.ID, 10), c.Info.Name.O))
zap.String("table_id", strconv.FormatInt(c.PhysicalID, 10)),
Copy link
Member

Choose a reason for hiding this comment

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

You can replace it with zap.Int.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

Copy link

ti-chi-bot bot commented Dec 20, 2023

[APPROVALNOTIFIER] This PR is APPROVED

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

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 Dec 20, 2023
Copy link

ti-chi-bot bot commented Dec 20, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-12-20 11:28:57.110650317 +0000 UTC m=+1046828.147877254: ☑️ agreed by winoros.
  • 2023-12-20 11:40:11.077986398 +0000 UTC m=+1047502.115213326: ☑️ agreed by hawkingrei.

@hawkingrei
Copy link
Member

/retest

@hawkingrei
Copy link
Member

/ok-to-test

@ti-chi-bot ti-chi-bot bot added the ok-to-test Indicates a PR is ready to be tested. label Dec 20, 2023
@hawkingrei
Copy link
Member

/test all

1 similar comment
@hawkingrei
Copy link
Member

/test all

@ti-chi-bot ti-chi-bot bot merged commit 6a5a5e7 into pingcap:master Dec 20, 2023
17 checks passed
@ti-chi-bot
Copy link
Member

@elsa0520: new pull request created to branch release-6.5: #49636.

In response to this:

/cherry-pick release-6.5

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.

elsa0520 added a commit to ti-chi-bot/tidb that referenced this pull request Dec 21, 2023
@elsa0520 elsa0520 added the sig/planner SIG: Planner label Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm ok-to-test Indicates a PR is ready to be tested. release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resolve most of timeout sync load stats request in mertrics
4 participants