gh-ost/go/logic
Andrew Mason b751499091
Cancel any row count queries before attempting to cut over (#846)
* Cancel any row count queries before attempting to cut over

Closes #830. Switches from using `QueryRow` to `QueryRowContext`, and
stores a context.CancelFunc in the migration context, which is called to
halt any running row count query before beginning the cut over.

* Make it threadsafe

* Kill the count query on the database side as well

* Explicitly grab a connection to run the count, store its connection id
* When the query context is canceled, run a `KILL QUERY ?` on that connection id

* Rewrite these to use the threadsafe functions, stop exporting the cancel func

* Update logger

* Update logger

Co-authored-by: Tim Vaillancourt <timvaillancourt@github.com>
Co-authored-by: Tim Vaillancourt <tim@timvaillancourt.com>
Co-authored-by: dm-2 <45519614+dm-2@users.noreply.github.com>
2022-07-07 00:23:23 +02:00
..
applier.go Ensure mysql rows responses are closed (#1132) 2022-07-06 23:32:15 +02:00
hooks.go Add golangci-lint CI action, fix gosimple, govet + unused lint errors (#1127) 2022-05-31 21:23:39 +02:00
inspect.go Cancel any row count queries before attempting to cut over (#846) 2022-07-07 00:23:23 +02:00
migrator.go Cancel any row count queries before attempting to cut over (#846) 2022-07-07 00:23:23 +02:00
server.go Add mysql port and version 2021-04-03 23:24:29 +02:00
streamer.go Use switch statements for readability, simplify .NewGoMySQLReader() (#1135) 2022-07-06 23:45:26 +02:00
throttler.go Add context/timeout to HTTP throttle check (#1131) 2022-07-06 23:56:07 +02:00