-
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: Increase ddl unit test speed #41034
ddl: Increase ddl unit test speed #41034
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
Hi @blacktear23. Thanks for your PR. I'm waiting for a pingcap member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the 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/test-infra repository. |
PTAL @wjhuang2016 @zimulala |
/check-issue-triage-complete |
/ok-to-test |
/ok-to-test |
It is unnecessary for you. It is for pingcap's staff members to allow contributors to run CI tasks for safety factors. Now you can run tasks by yourself. |
/retest |
1 similar comment
/retest |
domain/domain.go
Outdated
@@ -711,78 +712,86 @@ func (do *Domain) refreshMDLCheckTableInfo() { | |||
} | |||
|
|||
func (do *Domain) mdlCheckLoop() { | |||
ticker := time.Tick(time.Millisecond * 50) | |||
var ticker <-chan time.Time | |||
if intest.InTest { |
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.
If we provide a notify after MDL updated is change the tick duration in test required? @hawkingrei
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.
I think it is possible to implement it.
/retest |
PTAL @wjhuang2016 @zimulala |
ddl/job_table.go
Outdated
@@ -174,15 +175,24 @@ func (d *ddl) startDispatchLoop() { | |||
if d.etcdCli != nil { | |||
notifyDDLJobByEtcdCh = d.etcdCli.Watch(d.ctx, addingDDLJobConcurrent) | |||
} | |||
ticker := time.NewTicker(1 * time.Second) | |||
var ticker *time.Ticker | |||
if intest.InTest { |
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.
Personally, I think it is ugly to introduce inTest
into the code, should it be directly used as a variable, such as xxxInterval, and then directly change this variable for testing, rather than into the real code
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.
Agreed. And by the way, why sleep for 1 second? Why not some formula with some variables like nn * TTL
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.
The original code is https://github.com/pingcap/tidb/blob/release-6.4/ddl/ddl_worker.go#L182. Fine-tuning may have been done to support parallel DDL. I think it should be similar to the original logic implementation, which has some association with TTL (lease).
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.
If there is any suggestion, can you propose a new PR?
/retest |
Is anyone has any idea about why the unit-test always fail? |
/retest |
/retest |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: c8132d0
|
/retest |
/test |
@hawkingrei: The
Use In response to this:
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/test-infra repository. |
/retest |
What problem does this PR solve?
Issue Number: close #41216
Problem Summary:
make test or make ut is too slow, sometimes timeout after 10min
What is changed and how it works?
Update some ticker and wait time to shorten the wait time for unit test.
mdlCheckLoop
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.