gh-ost/go
Andrew Mason f29e63bc71 Check RowsAffected when applying DML events to get more accurate statistics (#844)
* Check RowsAffected when applying DML events to get more accurate statistics

Addresses #600.

When applying a DML event, check the RowsAffected on the `Result`
struct. Since all DML event queries are point queries, this will only
ever be 0 or 1. The applier then takes this value and multiplies by
the `rowsDelta` of the event, resulting in a properly-signed, accurate
row delta to use in the statistics.

If an error occurs here, log it, but do not surface this as an
actual error .. simply assume the DML affected a row and move on. It
will be inaccurate, but this is already the case.

* Fix import

* update wording to warning log message

Co-authored-by: Tim Vaillancourt <timvaillancourt@github.com>
2022-07-07 16:21:08 +01:00
..
base Cancel any row count queries before attempting to cut over (#846) 2022-07-07 16:21:08 +01:00
binlog Use switch statements for readability, simplify .NewGoMySQLReader() (#1135) 2022-07-07 16:21:08 +01:00
cmd/gh-ost Add context/timeout to HTTP throttle check (#1131) 2022-07-07 16:21:08 +01:00
logic Check RowsAffected when applying DML events to get more accurate statistics (#844) 2022-07-07 16:21:08 +01:00
mysql Add golangci-lint CI action, fix gosimple, govet + unused lint errors (#1127) 2022-07-07 16:21:08 +01:00
os renaming to gh-ost 2016-05-16 11:09:17 +02:00
sql Add golangci-lint CI action, fix gosimple, govet + unused lint errors (#1127) 2022-07-07 16:21:08 +01:00