-
Notifications
You must be signed in to change notification settings - Fork 188
checker: increase total timeout to 30m; set readTimeout for DB check operation to 30s #315
Conversation
/run-all-tests |
1 similar comment
/run-all-tests |
Codecov Report
@@ Coverage Diff @@
## master #315 +/- ##
===============================================
+ Coverage 59.5074% 59.9455% +0.438%
===============================================
Files 135 135
Lines 15267 15047 -220
===============================================
- Hits 9085 9020 -65
+ Misses 5301 5151 -150
+ Partials 881 876 -5 |
@WangXiangUSTC @lichunzhu PTAL |
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.
rest LGTM
checker/checker.go
Outdated
@@ -125,7 +126,9 @@ func (c *Checker) Init() (err error) { | |||
User: instance.cfg.From.User, | |||
Password: instance.cfg.From.Password, | |||
} | |||
instance.sourceDB, err = dbutil.OpenDB(*instance.sourceDBinfo) | |||
dbCfg := instance.cfg.From | |||
dbCfg.RawDBCfg = config.DefaultRawDBConfig().SetReadTimeout("30s") |
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.
how about define a const value for 30s
and 30*time.Minute
?
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.
instance is a pointer, we need make sure it will not do influence to others if we SetReadTimeout
here
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.
instance
only used for checking and I want all operation in checking affected by this readTime
.
BTW, instance.cfg.From
is a value.
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.
how about define a const value for
30s
and30*time.Minute
?
addressed in c72263d.
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.
30s
not define as a value
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.
👍 done in 1bc7a3f.
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
cherry pick to release-1.0 in PR #327 |
…operation to 30s (pingcap#315)
What problem does this PR solve?
If a mass of tables in one task, the check operation may not be complete in 1 minute.
What is changed and how it works?
readTimeout
for DB operation to 30sCheck List
Tests
Related changes