Skip to content

Commit

Permalink
*: fix wrong log because of wrongly rename (pingcap#56628)
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkingrei authored Oct 14, 2024
1 parent 94b2ac0 commit ca8d322
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions cmd/importer/rand.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ func randTime(col *column) string {

minTime, err := time.Parse(timeFormat, minv)
if err != nil {
log.Warn("parse minv time failed", zap.Error(err))
log.Warn("parse min time failed", zap.Error(err))
}
maxTime, err := time.Parse(timeFormat, maxv)
if err != nil {
log.Warn("parse maxv time failed", zap.Error(err))
log.Warn("parse max time failed", zap.Error(err))
}
seconds := int(maxTime.Sub(minTime).Seconds())
t := minTime.Add(time.Duration(randInt(0, seconds)) * time.Second)
Expand All @@ -138,7 +138,7 @@ func randTimestamp(col *column) string {

minTime, err := time.Parse(dateTimeFormat, minv)
if err != nil {
log.Warn("parse minv timestamp failed", zap.Error(err))
log.Warn("parse min timestamp failed", zap.Error(err))
}
if maxv == "" {
t := minTime.Add(time.Duration(randInt(0, 365)) * 24 * time.Hour) // nolint: durationcheck
Expand All @@ -147,7 +147,7 @@ func randTimestamp(col *column) string {

maxTime, err := time.Parse(dateTimeFormat, maxv)
if err != nil {
log.Warn("parse maxv timestamp failed", zap.Error(err))
log.Warn("parse max timestamp failed", zap.Error(err))
}
seconds := int(maxTime.Sub(minTime).Seconds())
t := minTime.Add(time.Duration(randInt(0, seconds)) * time.Second)
Expand All @@ -165,11 +165,11 @@ func randYear(col *column) string {

minTime, err := time.Parse(yearFormat, minv)
if err != nil {
log.Warn("parse minv year failed", zap.Error(err))
log.Warn("parse min year failed", zap.Error(err))
}
maxTime, err := time.Parse(yearFormat, maxv)
if err != nil {
log.Warn("parse maxv year failed", zap.Error(err))
log.Warn("parse max year failed", zap.Error(err))
}
seconds := int(maxTime.Sub(minTime).Seconds())
t := minTime.Add(time.Duration(randInt(0, seconds)) * time.Second)
Expand Down
2 changes: 1 addition & 1 deletion dumpling/export/dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@ func (d *Dumper) selectMinAndMaxIntValue(tctx *tcontext.Context, conn *BaseConn,
return err
}, func() {}, query)
if err != nil {
return zero, zero, errors.Annotatef(err, "can't get min/maxv values to split chunks, query: %s", query)
return zero, zero, errors.Annotatef(err, "can't get min/max values to split chunks, query: %s", query)
}
if !smax.Valid || !smin.Valid {
// found no data
Expand Down

0 comments on commit ca8d322

Please sign in to comment.