Commit Graph

482 Commits

Author SHA1 Message Date
Tim Vaillancourt
bea5323816
Merge branch 'master' into master 2023-01-28 00:19:37 +01:00
Morgan Tocker
59c1a24774 remove useless func per review 2022-11-15 15:40:21 -07:00
Morgan Tocker
74fb8e80b2
Update go/logic/migrator.go
Co-authored-by: dm-2 <45519614+dm-2@users.noreply.github.com>
2022-11-15 12:05:27 -07:00
Morgan Tocker
3f3a10a213 Address PR feedback 2022-11-14 14:48:49 -07:00
Tim Vaillancourt
cfd83728ed
Merge branch 'master' into attempt-instant-ddl 2022-11-14 22:09:55 +01:00
Morgan Tocker
75a346be93 Add tests, incorporate feedback 2022-11-14 11:47:30 -07:00
Morgan Tocker
05f32ebf29 minor cleanup 2022-11-10 09:30:13 -07:00
Morgan Tocker
1be6a4c082 Attempt instant DDL if supported 2022-11-09 20:11:49 -07:00
Nicholas Calugar
515aa72d3d Print status to migration context logger 2022-10-27 11:42:12 -07:00
dm-2
b5387331f8
Merge branch 'master' into master 2022-10-21 17:02:17 +01:00
Tim Vaillancourt
9b3fa793ac
Enable more golangci-lint linters (#1181) 2022-10-21 18:02:06 +02:00
dm-2
659e4401ba
Merge branch 'master' into master 2022-10-21 17:00:05 +01:00
Tim Vaillancourt
df4cf7b38e
Add basic test for hooks (#1179) 2022-10-21 17:47:39 +02:00
lmtwga
321e5847ba fix: because lock is not release, drop cutover sentry table is hanged 2022-09-16 17:49:09 +08:00
Tim Vaillancourt
1df37c207f
Add basic tests to migrator (#1168) 2022-09-06 15:48:48 +02:00
Tim Vaillancourt
05c7ed5f8f
Add basic test for inspector (#1166)
* Add basic test for inspector

* Add header

* Fix return
2022-09-06 15:23:18 +02:00
Tim Vaillancourt
1fa3d4f75a
Add basic tests for applier (#1165)
* Add basic tests for applier

* Add header
2022-09-06 15:06:14 +02:00
Tim Vaillancourt
3c946e97d7
Improve applier .ReadMigrationRangeValues() func accuracy (#1164)
* Use a transaction in applier `ReadMigrationRangeValues` func

* Private func names
2022-09-06 14:07:47 +02:00
dm-2
9c2c7bad1b
Merge branch 'master' into fix-charset 2022-09-06 11:44:07 +01:00
Abirdcfly
ca8aef5d6d
chore: remove duplicate word in comments (#1175)
Signed-off-by: Abirdcfly <fp544037857@gmail.com>

Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2022-08-30 23:49:13 +02:00
wangzihuacool
e9cb4a233f convert to bytes if character string without charsetConversion. 2022-08-27 01:55:36 +00:00
Tim Vaillancourt
bee009b9e3
Allow zero in dates (#1161)
* Merge pull request #31 from openark/zero-date

Support zero date and zero in date, via dedicated command line flag

* Merge pull request #32 from openark/existing-date-with-zero

Support tables with existing zero dates

* Remove un-needed ignore_versions file

* Fix new lint errors from golang-ci update

Co-authored-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
2022-08-10 21:50:59 +02:00
Tim Vaillancourt
ffe54f48ed
Enable more golang-ci linters (#1149) 2022-07-18 18:37:18 +02:00
Tim Vaillancourt
f527d63c86
Move .Kill() func from inspector to go/mysql (#1148) 2022-07-11 11:02:04 +02:00
Tim Vaillancourt
54db4174b3 Consolidate no-op states 2022-07-07 17:40:01 +02:00
Tim Vaillancourt
246800e053 Fix lint 2022-07-07 17:38:41 +02:00
Tim Vaillancourt
d6d1d3b436
Merge branch 'master' into changelog-migrated-state 2022-07-07 17:35:59 +02:00
dm-2
f9fa4231d7
Merge branch 'master' into golang-ci-staticcheck-linter 2022-07-07 15:47:59 +01:00
dm-2
8eb9708755
Merge branch 'master' into changlog-table-comment 2022-07-07 15:34:30 +01:00
Tim Vaillancourt
e45357097f cleanup v5 2022-07-07 05:10:22 +02:00
Tim Vaillancourt
eead61cb6d cleanup v4 2022-07-07 05:05:37 +02:00
Tim Vaillancourt
c3593c94ff cleanup v3 2022-07-07 03:27:36 +02:00
Tim Vaillancourt
0303031fc2 cleanup v2 2022-07-07 03:22:53 +02:00
Tim Vaillancourt
0ec555badf Cleanup 2022-07-07 03:19:53 +02:00
Tim Vaillancourt
500fbefdb9 golang-ci: fix staticcheck linter warnings 2022-07-07 03:12:44 +02:00
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
Tim Vaillancourt
0918bab29b
Add context/timeout to HTTP throttle check (#1131)
* Add context/timeout to HTTP throttle check

* Dont run `.GetThrottleHTTPInterval()` on every loop

* Update help message

* Var rename

* 2022

* Add timeout flag

* Add unix/tcp server commands, use ParseInt() for string->int64

* Var rename

* Re-check http timeout on every loop iteration

* Remove stale comment

* Make throttle interval idempotent

* var rename

* Usage grammar

* Make http timeout idempotent too

* Parse time.Duration once

* Move timeout to NewThrottler

* Help update

* Set User-Agent header

* Re-add newline

Co-authored-by: dm-2 <45519614+dm-2@users.noreply.github.com>
2022-07-06 23:56:07 +02:00
Tim Vaillancourt
0b066c16a5
Use switch statements for readability, simplify .NewGoMySQLReader() (#1135)
* Use `switch` statements for readability

* Simplify initBinlogReader()
2022-07-06 23:45:26 +02:00
Tim Vaillancourt
6bf32f2015
Ensure mysql rows responses are closed (#1132)
Co-authored-by: dm-2 <45519614+dm-2@users.noreply.github.com>
2022-07-06 23:32:15 +02:00
dm-2
b7f7e2c0b0
Merge branch 'master' into fix-issue-1117 2022-07-06 16:58:51 +01:00
Tim Vaillancourt
38e86e5791
Merge branch 'master' into fix-two-phase-commit-lost-data_v2 2022-06-25 00:37:12 +02:00
shaohk
87970f6312 fix(lost data in mysql two-phase commit): lost data in mysql two-phase commit 2022-06-24 11:38:05 +08:00
Tim Vaillancourt
de339dd042 Fix integer divide by zero panic in migrator 2022-06-23 03:37:18 +02:00
Tim Vaillancourt
387b32594e Var rename 2022-06-07 01:49:18 +02:00
Tim Vaillancourt
bf0c13b46d Add table comment to changelog 2022-06-07 01:47:51 +02:00
Tim Vaillancourt
ec199f1185 revert out of scope change 2022-06-05 00:06:41 +02:00
Tim Vaillancourt
af99b247f9 Add Migrated changelog event 2022-06-04 23:59:00 +02:00
Tim Vaillancourt
ed46138c06
Add golangci-lint CI action, fix gosimple, govet + unused lint errors (#1127)
* Add `golangci-lint`, fix `gosimple`, `govet` and `unused` linter complaints

* Go 1.16

* Update copyright dates
2022-05-31 21:23:39 +02:00
Tim Vaillancourt
5ea949f31e Remove end-of-life MySQL 5.5.x 2022-02-25 00:02:27 +01:00
dm-2
260e662197
Merge branch 'master' into inspector-connectionConfig-instanceKey-string 2022-02-24 10:34:19 +00:00