-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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 index progress metric #14055
ddl: add index progress metric #14055
Conversation
ddl/ddl_worker.go
Outdated
@@ -69,6 +70,7 @@ type worker struct { | |||
quitCh chan struct{} | |||
wg sync.WaitGroup | |||
|
|||
statsHandle unsafe.Pointer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use domain
to get statsHandle
will have a circle import problem. So stay the statsHandle
in DDL worker.
Codecov Report
@@ Coverage Diff @@
## master #14055 +/- ##
===========================================
Coverage ? 80.2878%
===========================================
Files ? 483
Lines ? 122209
Branches ? 0
===========================================
Hits ? 98119
Misses ? 16300
Partials ? 7790 |
@lamxTyler @AilinKid PTAL |
can we change the progress from [0, 1] to [0, 100]? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/run-all-tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/run-all-tests |
/run-all-tests |
@crazycs520 merge failed. |
/run-all-tests |
/run-integration-copr-test |
What problem does this PR solve?
It indicates the progress of the current add index job. Since we not support concurrently add multi-index jobs now, it will be ok now.
The add index progress = (added row count) / (total row count) *100.
To avoid use
select count(*)
to get the total count of the table, It use the table count from statistics, It doesn't matter since it uses to estimate the progress.related pr: pingcap/tidb-ansible#1064
What is changed and how it works?
Check List
Tests
Code changes
Side effects
Related changes
Release note