simplified error logic; fixed incorrect RowsEstimate handling on error
This commit is contained in:
parent
74593ec010
commit
75e0d12302
@ -880,15 +880,14 @@ func (this *Applier) ApplyDMLEventQuery(dmlEvent *binlog.BinlogDMLEvent) error {
|
||||
return nil
|
||||
}()
|
||||
|
||||
if err == nil {
|
||||
atomic.AddInt64(&this.migrationContext.TotalDMLEventsApplied, 1)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("%s; query=%s; args=%+v", err.Error(), query, args)
|
||||
return log.Errore(err)
|
||||
}
|
||||
// no error
|
||||
atomic.AddInt64(&this.migrationContext.TotalDMLEventsApplied, 1)
|
||||
if this.migrationContext.CountTableRows {
|
||||
atomic.AddInt64(&this.migrationContext.RowsEstimate, rowDelta)
|
||||
}
|
||||
if err != nil {
|
||||
err = fmt.Errorf("%s; query=%s; args=%+v", err.Error(), query, args)
|
||||
log.Errore(err)
|
||||
}
|
||||
return err
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user