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
|
return nil
|
||||||
}()
|
}()
|
||||||
|
|
||||||
if err == nil {
|
if err != nil {
|
||||||
atomic.AddInt64(&this.migrationContext.TotalDMLEventsApplied, 1)
|
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 {
|
if this.migrationContext.CountTableRows {
|
||||||
atomic.AddInt64(&this.migrationContext.RowsEstimate, rowDelta)
|
atomic.AddInt64(&this.migrationContext.RowsEstimate, rowDelta)
|
||||||
}
|
}
|
||||||
if err != nil {
|
return nil
|
||||||
err = fmt.Errorf("%s; query=%s; args=%+v", err.Error(), query, args)
|
|
||||||
log.Errore(err)
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user