gh-ost/go/logic
Andrew Mason 6e1daf90ee
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>

Co-authored-by: Tim Vaillancourt <timvaillancourt@github.com>
2021-07-14 16:48:03 +02:00
..
applier.go Check RowsAffected when applying DML events to get more accurate statistics (#844) 2021-07-14 16:48:03 +02:00
hooks.go Add go mod (#935) 2021-06-24 20:19:37 +02:00
inspect.go Add go mod (#935) 2021-06-24 20:19:37 +02:00
migrator.go hooks: reporting GH_OST_ETA_SECONDS. ETA as part of migration context (#936) 2021-05-31 14:15:51 +02:00
server.go Add mysql port and version 2021-04-03 23:24:29 +02:00
streamer.go Add go mod (#935) 2021-06-24 20:19:37 +02:00
throttler.go All MySQL DBs limited to max 3 concurrent/idle connections #15 (#931) 2021-05-27 20:00:58 +02:00