Skip to content

Commit

Permalink
ddl: update reorg wait time (pingcap#4808)
Browse files Browse the repository at this point in the history
  • Loading branch information
zimulala authored Oct 19, 2017
1 parent d624b69 commit f1c82ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ddl/reorg.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func (d *ddl) runReorgJob(job *model.Job, f func() error) error {
// we will wait 2 * lease outer and try checking again,
// so we use a very little timeout here.
if d.lease > 0 {
waitTimeout = 1 * time.Millisecond
waitTimeout = 50 * time.Millisecond
}

// wait reorganization job done or timeout
Expand Down
2 changes: 1 addition & 1 deletion ddl/reorg_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func (s *testDDLSuite) TestReorg(c *C) {
rowCount := int64(10)
f := func() error {
d.setReorgRowCount(rowCount)
time.Sleep(4 * testLease)
time.Sleep(20 * testLease)
return nil
}
job := &model.Job{}
Expand Down

0 comments on commit f1c82ac

Please sign in to comment.