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

ddl: add more metrics for different operations of job execution, refine panels #58360

Merged
merged 4 commits into from
Dec 20, 2024

Conversation

D3Hunter
Copy link
Contributor

@D3Hunter D3Hunter commented Dec 17, 2024

What problem does this PR solve?

Issue Number: ref #54436

Problem Summary:

What changed and how does it work?

  • add metrics to more operations of job execution
  • merge "Update Self Version Duration" panel to Sync Schema Version Operations Duration
  • move panels related to DDL execution up, move panels related backfill/add-index down
  • add avg to some panel, and hide the p99, it's more helpful to diagnose throughput issue using avg metric
  • rename some panel Title to reflect what it means.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)

after this PR, panels in DDL orders and shows in this way:

image
image
image

  • 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

Copy link

ti-chi-bot bot commented Dec 17, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ti-chi-bot ti-chi-bot bot added do-not-merge/invalid-title do-not-merge/needs-linked-issue do-not-merge/needs-tests-checked do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 17, 2024
Copy link

tiprow bot commented Dec 17, 2024

Hi @D3Hunter. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

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 kubernetes-sigs/prow repository.

@D3Hunter D3Hunter changed the title [DNM]change [DNM]test ddl Dec 17, 2024
@ti-chi-bot ti-chi-bot bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 19, 2024
@@ -351,11 +351,6 @@ func JobNeedGC(job *model.Job) bool {
// finishDDLJob deletes the finished DDL job in the ddl queue and puts it to history queue.
// If the DDL job need to handle in background, it will prepare a background job.
func (w *worker) finishDDLJob(jobCtx *jobContext, job *model.Job) (err error) {
startTime := time.Now()
defer func() {
metrics.DDLWorkerHistogram.WithLabelValues(metrics.WorkerFinishDDLJob, job.Type.String(), metrics.RetLabel(err)).Observe(time.Since(startTime).Seconds())
Copy link
Contributor Author

Choose a reason for hiding this comment

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

merge into handle_job_done

@D3Hunter D3Hunter changed the title [DNM]test ddl ddl: add more metrics for different operations of job execution, refine panels Dec 19, 2024
@D3Hunter D3Hunter marked this pull request as ready for review December 19, 2024 07:23
@ti-chi-bot ti-chi-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 19, 2024
Copy link

codecov bot commented Dec 19, 2024

Codecov Report

Attention: Patch coverage is 94.73684% with 2 lines in your changes missing coverage. Please review.

Project coverage is 74.8506%. Comparing base (d92dce0) to head (bfda1a0).
Report is 32 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #58360        +/-   ##
================================================
+ Coverage   73.2226%   74.8506%   +1.6279%     
================================================
  Files          1679       1727        +48     
  Lines        462548     477682     +15134     
================================================
+ Hits         338690     357548     +18858     
+ Misses       103086      97782      -5304     
- Partials      20772      22352      +1580     
Flag Coverage Δ
integration 48.8653% <92.1052%> (?)
unit 72.3373% <94.7368%> (-0.0325%) ⬇️

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

Components Coverage Δ
dumpling 52.6910% <ø> (ø)
parser ∅ <ø> (∅)
br 60.3806% <ø> (+14.3576%) ⬆️

@D3Hunter D3Hunter changed the title ddl: add more metrics for different operations of job execution, refine panels [WIP]ddl: add more metrics for different operations of job execution, refine panels Dec 19, 2024
@ti-chi-bot ti-chi-bot bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 19, 2024
@D3Hunter D3Hunter changed the title [WIP]ddl: add more metrics for different operations of job execution, refine panels ddl: add more metrics for different operations of job execution, refine panels Dec 20, 2024
@ti-chi-bot ti-chi-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 20, 2024
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Dec 20, 2024
Copy link

ti-chi-bot bot commented Dec 20, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tangenta, wjhuang2016

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, 2024
Copy link

ti-chi-bot bot commented Dec 20, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-12-20 06:28:30.05344114 +0000 UTC m=+1197500.142243675: ☑️ agreed by wjhuang2016.
  • 2024-12-20 06:37:52.527033725 +0000 UTC m=+1198062.615836267: ☑️ agreed by tangenta.

Copy link

tiprow bot commented Dec 20, 2024

@D3Hunter: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
fast_test_tiprow bfda1a0 link true /test fast_test_tiprow

Full PR test history. Your PR dashboard.

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

@ti-chi-bot ti-chi-bot bot merged commit bf7016d into pingcap:master Dec 20, 2024
26 of 27 checks passed
@D3Hunter D3Hunter deleted the ddl-metric branch December 20, 2024 06:57
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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants