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

Unstable test testDDLSuite.TestParallelDDL #31590

Closed
Tracked by #25899
tangenta opened this issue Jan 12, 2022 · 0 comments · Fixed by #31591
Closed
Tracked by #25899

Unstable test testDDLSuite.TestParallelDDL #31590

tangenta opened this issue Jan 12, 2022 · 0 comments · Fixed by #31591

Comments

@tangenta
Copy link
Contributor

tangenta commented Jan 12, 2022

[2022-01-11T13:08:03.507Z] FAIL: ddl_worker_test.go:1530: testDDLSuite.TestParallelDDL
[2022-01-11T13:08:03.507Z] 
[2022-01-11T13:08:03.507Z] ddl_worker_test.go:1690:
[2022-01-11T13:08:03.507Z]     err := kv.RunInNewTxn(context.Background(), store, false, func(ctx context.Context, txn kv.Transaction) error {
[2022-01-11T13:08:03.507Z]         m := meta.NewMeta(txn)
[2022-01-11T13:08:03.507Z]         lastJob, err := m.GetHistoryDDLJob(job12.ID)
[2022-01-11T13:08:03.507Z]         c.Assert(err, IsNil)
[2022-01-11T13:08:03.507Z]         // all jobs are finished.
[2022-01-11T13:08:03.507Z]         if lastJob != nil {
[2022-01-11T13:08:03.507Z]             finishedJobs, err := m.GetAllHistoryDDLJobs()
[2022-01-11T13:08:03.507Z]             c.Assert(err, IsNil)
[2022-01-11T13:08:03.507Z]             // get the last 12 jobs completed.
[2022-01-11T13:08:03.507Z]             finishedJobs = finishedJobs[len(finishedJobs)-12:]
[2022-01-11T13:08:03.507Z]             // check some jobs are ordered because of the dependence.
[2022-01-11T13:08:03.507Z]             c.Assert(finishedJobs[0].ID, Equals, job1.ID, Commentf("%v", finishedJobs))
[2022-01-11T13:08:03.507Z]             c.Assert(finishedJobs[1].ID, Equals, job2.ID, Commentf("%v", finishedJobs))
[2022-01-11T13:08:03.507Z]             c.Assert(finishedJobs[2].ID, Equals, job3.ID, Commentf("%v", finishedJobs))
[2022-01-11T13:08:03.507Z]             c.Assert(finishedJobs[4].ID, Equals, job5.ID, Commentf("%v", finishedJobs))
[2022-01-11T13:08:03.507Z]             c.Assert(finishedJobs[11].ID, Equals, job12.ID, Commentf("%v", finishedJobs))
[2022-01-11T13:08:03.507Z]             // check the jobs are ordered in the backfill-job queue or general-job queue.
[2022-01-11T13:08:03.507Z]             backfillJobID := int64(0)
[2022-01-11T13:08:03.507Z]             generalJobID := int64(0)
[2022-01-11T13:08:03.507Z]             for _, job := range finishedJobs {
[2022-01-11T13:08:03.507Z]                 // check jobs' order.
[2022-01-11T13:08:03.507Z]                 if mayNeedReorg(job) {
[2022-01-11T13:08:03.507Z]                     c.Assert(job.ID, Greater, backfillJobID)
[2022-01-11T13:08:03.507Z]                     backfillJobID = job.ID
[2022-01-11T13:08:03.507Z]                 } else {
[2022-01-11T13:08:03.507Z]                     c.Assert(job.ID, Greater, generalJobID)
[2022-01-11T13:08:03.507Z]                     generalJobID = job.ID
[2022-01-11T13:08:03.507Z]                 }
[2022-01-11T13:08:03.507Z]                 // check jobs' state.
[2022-01-11T13:08:03.507Z]                 if job.ID == lastJob.ID {
[2022-01-11T13:08:03.507Z]                     c.Assert(job.State, Equals, model.JobStateCancelled, Commentf("job: %v", job))
[2022-01-11T13:08:03.507Z]                 } else {
[2022-01-11T13:08:03.507Z]                     c.Assert(job.State, Equals, model.JobStateSynced, Commentf("job: %v", job))
[2022-01-11T13:08:03.507Z]                 }
[2022-01-11T13:08:03.507Z]             }
[2022-01-11T13:08:03.507Z] 
[2022-01-11T13:08:03.507Z]             isChecked = true
[2022-01-11T13:08:03.507Z]         }
[2022-01-11T13:08:03.507Z]         return nil
[2022-01-11T13:08:03.507Z]     })
[2022-01-11T13:08:03.507Z] ddl_worker_test.go:1701:
[2022-01-11T13:08:03.507Z]     // check some jobs are ordered because of the dependence.
[2022-01-11T13:08:03.507Z]     c.Assert(finishedJobs[0].ID, Equals, job1.ID, Commentf("%v", finishedJobs))
[2022-01-11T13:08:03.507Z] ... obtained int64 = 10
[2022-01-11T13:08:03.507Z] ... expected int64 = 11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant