Skip to content

Commit 2edc9f2

Browse files
authored
Merge branch 'master' into update-dependabot-103d88a8
2 parents 96dae4d + aa010a0 commit 2edc9f2

File tree

331 files changed

+49257
-16020
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

331 files changed

+49257
-16020
lines changed

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @rashiq @meiji163 @timvaillancourt

.github/workflows/ci.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ on: [pull_request]
55
jobs:
66
build:
77

8-
runs-on: ubuntu-20.04
8+
runs-on: ubuntu-latest
99

1010
steps:
11-
- uses: actions/checkout@v2
11+
- uses: actions/checkout@v4
1212

1313
- name: Set up Go
14-
uses: actions/setup-go@v1
14+
uses: actions/setup-go@v4
1515
with:
16-
go-version: 1.17
16+
go-version-file: go.mod
1717

1818
- name: Build
1919
run: script/cibuild

.github/workflows/codeql.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
uses: actions/checkout@v2
2020

2121
- name: Initialize CodeQL
22-
uses: github/codeql-action/init@v1
22+
uses: github/codeql-action/init@v2
2323

2424
- name: Perform CodeQL Analysis
25-
uses: github/codeql-action/analyze@v1
25+
uses: github/codeql-action/analyze@v2

.github/workflows/golangci-lint.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ jobs:
1313
name: lint
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/setup-go@v3
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-go@v4
1718
with:
18-
go-version: 1.17
19-
- uses: actions/checkout@v3
19+
go-version-file: go.mod
2020
- name: golangci-lint
2121
uses: golangci/golangci-lint-action@v3
2222
with:
23-
version: v1.46.2
23+
version: v1.54.2

.github/workflows/replica-tests.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ jobs:
1111
version: [mysql-5.7.25,mysql-8.0.16,PerconaServer-8.0.21]
1212

1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v4
1515

1616
- name: Set up Go
17-
uses: actions/setup-go@v1
17+
uses: actions/setup-go@v4
1818
with:
19-
go-version: 1.17
19+
go-version-file: go.mod
2020

2121
- name: migration tests
2222
env:

Dockerfile.packaging

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
FROM golang:1.17
1+
FROM golang:1.21-bullseye
22

33
RUN apt-get update
44
RUN apt-get install -y ruby ruby-dev rubygems build-essential
5-
RUN gem install --no-ri --no-rdoc fpm
5+
RUN gem install fpm
66
ENV GOPATH=/tmp/go
77

88
RUN apt-get install -y curl

Dockerfile.test

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.17
1+
FROM golang:1.21-bullseye
22
LABEL maintainer="[email protected]"
33

44
RUN apt-get update

RELEASE_VERSION

-1
This file was deleted.

build.sh

+6-2
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,18 @@ main() {
5252
RELEASE_VERSION=$(git describe --abbrev=0 --tags | tr -d 'v')
5353
fi
5454
if [ -z "${RELEASE_VERSION}" ] ; then
55-
RELEASE_VERSION=$(cat RELEASE_VERSION)
55+
echo "RELEASE_VERSION must be set"
56+
exit 1
5657
fi
5758

59+
if [ -z "${GIT_COMMIT}" ]; then
60+
GIT_COMMIT=$(git rev-parse HEAD)
61+
fi
5862

5963
buildpath=/tmp/gh-ost-release
6064
target=gh-ost
6165
timestamp=$(date "+%Y%m%d%H%M%S")
62-
ldflags="-X main.AppVersion=${RELEASE_VERSION}"
66+
ldflags="-X main.AppVersion=${RELEASE_VERSION} -X main.GitCommit=${GIT_COMMIT}"
6367

6468
mkdir -p ${buildpath}
6569
rm -rf ${buildpath:?}/*

doc/azure.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ gh-ost \
1717
--master-user="master-user-name" \
1818
--master-password="master-password" \
1919
--assume-rbr \
20-
[-- other paramters you need]
20+
[-- other parameters you need]
2121
```
2222

2323

2424
[new_issue]: https://github.com/github/gh-ost/issues/new
2525
[assume_rbr_docs]: https://github.com/github/gh-ost/blob/master/doc/command-line-flags.md#assume-rbr
26-
[migrate_test_on_replica_docs]: https://github.com/github/gh-ost/blob/master/doc/cheatsheet.md#c-migratetest-on-replica
26+
[migrate_test_on_replica_docs]: https://github.com/github/gh-ost/blob/master/doc/cheatsheet.md#c-migratetest-on-replica

doc/command-line-flags.md

+6
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ It is not reliable to parse the `ALTER` statement to determine if it is instant
6161

6262
`gh-ost` will automatically fallback to the normal DDL process if the attempt to use instant DDL is unsuccessful.
6363

64+
### binlogsyncer-max-reconnect-attempts
65+
`--binlogsyncer-max-reconnect-attempts=0`, the maximum number of attempts to re-establish a broken inspector connection for sync binlog. `0` or `negative number` means infinite retry, default `0`
66+
6467
### conf
6568

6669
`--conf=/path/to/my.cnf`: file where credentials are specified. Should be in (or contain) the following format:
@@ -258,6 +261,9 @@ But RocksDB currently lacks a few features support compared to InnoDB:
258261

259262
When `--storage-engine=rocksdb`, `gh-ost` will make some changes necessary (e.g. sets isolation level to `READ_COMMITTED`) to support RocksDB.
260263

264+
### charset
265+
The default charset for the database connection is utf8mb4, utf8, latin1. The ability to specify character set and collation is supported, eg: utf8mb4_general_ci,utf8_general_ci,latin1.
266+
261267
### test-on-replica
262268

263269
Issue the migration on a replica; do not modify data on master. Useful for validating, testing and benchmarking. See [`testing-on-replica`](testing-on-replica.md)

doc/interactive-commands.md

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Both interfaces may serve at the same time. Both respond to simple text command,
1717
- `help`: shows a brief list of available commands
1818
- `status`: returns a detailed status summary of migration progress and configuration
1919
- `sup`: returns a brief status summary of migration progress
20+
- `cpu-profile`: returns a base64-encoded [`runtime/pprof`](https://pkg.go.dev/runtime/pprof) CPU profile using a duration, default: `30s`. Comma-separated options `gzip` and/or `block` (blocked profile) may follow the profile duration
2021
- `coordinates`: returns recent (though not exactly up to date) binary log coordinates of the inspected server
2122
- `applier`: returns the hostname of the applier
2223
- `inspector`: returns the hostname of the inspector

go.mod

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
module github.com/github/gh-ost
22

3-
go 1.17
3+
go 1.21
44

55
require (
66
github.com/go-ini/ini v1.62.0
77
github.com/go-mysql-org/go-mysql v1.3.0
88
github.com/go-sql-driver/mysql v1.6.0
9+
github.com/google/uuid v1.4.0
910
github.com/openark/golib v0.0.0-20210531070646-355f37940af8
10-
github.com/satori/go.uuid v1.2.0
11-
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83
12-
golang.org/x/net v0.0.0-20210224082022-3d97a244fca7
13-
golang.org/x/text v0.3.6
11+
golang.org/x/net v0.17.0
12+
golang.org/x/term v0.13.0
13+
golang.org/x/text v0.13.0
1414
)
1515

1616
require (
1717
github.com/pingcap/errors v0.11.5-0.20201126102027-b0a155152ca3 // indirect
18+
github.com/satori/go.uuid v1.2.0 // indirect
1819
github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24 // indirect
1920
github.com/siddontang/go v0.0.0-20180604090527-bdc77568d726 // indirect
2021
github.com/siddontang/go-log v0.0.0-20180807004314-8d05993dda07 // indirect
2122
github.com/smartystreets/goconvey v1.6.4 // indirect
2223
go.uber.org/atomic v1.7.0 // indirect
23-
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 // indirect
24-
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 // indirect
24+
golang.org/x/sys v0.13.0 // indirect
2525
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
2626
gopkg.in/ini.v1 v1.62.0 // indirect
2727
)

go.sum

+10-15
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LB
1717
github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE=
1818
github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
1919
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
20+
github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4=
21+
github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
2022
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
2123
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
2224
github.com/jmoiron/sqlx v1.3.3/go.mod h1:2BljVx/86SuTyjE+aPYlHCTNvZrnJXghYGpNiXLBMCQ=
@@ -81,37 +83,30 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk
8183
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
8284
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
8385
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
84-
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 h1:/ZScEX8SfEmUGRHs0gxpqteO5nfNW6axyZbBdw9A12g=
85-
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
8686
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
8787
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
8888
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
8989
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
9090
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
9191
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
9292
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
93-
golang.org/x/net v0.0.0-20210224082022-3d97a244fca7 h1:OgUuv8lsRpBibGNbSizVwKWlysjaNzmC9gYMhPVfqFM=
94-
golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
93+
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
94+
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
9595
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
9696
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
9797
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
9898
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
99-
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
10099
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
101-
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw=
102-
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
103-
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 h1:SrN+KX8Art/Sf4HNj6Zcz06G7VEz+7w9tdXTPOZ7+l4=
104-
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
105-
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
106-
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E=
107-
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
108-
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 h1:CBpWXWQpIRjzmkkA+M7q9Fqnwd2mZr3AFqexg8YTfoM=
109-
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
100+
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
101+
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
102+
golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek=
103+
golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
110104
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
111105
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
112106
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
113-
golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=
114107
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
108+
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
109+
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
115110
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
116111
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
117112
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=

go/base/context.go

+13-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"sync/atomic"
1616
"time"
1717

18-
uuid "github.com/satori/go.uuid"
18+
uuid "github.com/google/uuid"
1919

2020
"github.com/github/gh-ost/go/mysql"
2121
"github.com/github/gh-ost/go/sql"
@@ -232,6 +232,8 @@ type MigrationContext struct {
232232

233233
recentBinlogCoordinates mysql.BinlogCoordinates
234234

235+
BinlogSyncerMaxReconnectAttempts int
236+
235237
Log Logger
236238
}
237239

@@ -267,7 +269,7 @@ type ContextConfig struct {
267269

268270
func NewMigrationContext() *MigrationContext {
269271
return &MigrationContext{
270-
Uuid: uuid.NewV4().String(),
272+
Uuid: uuid.NewString(),
271273
defaultNumRetries: 60,
272274
ChunkSize: 1000,
273275
InspectorConnectionConfig: mysql.NewConnectionConfig(),
@@ -303,6 +305,15 @@ func (this *MigrationContext) SetConnectionConfig(storageEngine string) error {
303305
return nil
304306
}
305307

308+
func (this *MigrationContext) SetConnectionCharset(charset string) {
309+
if charset == "" {
310+
charset = "utf8mb4,utf8,latin1"
311+
}
312+
313+
this.InspectorConnectionConfig.Charset = charset
314+
this.ApplierConnectionConfig.Charset = charset
315+
}
316+
306317
func getSafeTableName(baseName string, suffix string) string {
307318
name := fmt.Sprintf("_%s_%s", baseName, suffix)
308319
if len(name) <= mysql.MaxTableNameLength {

go/base/context_test.go

+3-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
package base
77

88
import (
9-
"io/ioutil"
109
"os"
1110
"testing"
1211
"time"
@@ -68,7 +67,7 @@ func TestReadConfigFile(t *testing.T) {
6867
}
6968
}
7069
{
71-
f, err := ioutil.TempFile("", t.Name())
70+
f, err := os.CreateTemp("", t.Name())
7271
if err != nil {
7372
t.Fatalf("Failed to create tmp file: %v", err)
7473
}
@@ -82,7 +81,7 @@ func TestReadConfigFile(t *testing.T) {
8281
}
8382
}
8483
{
85-
f, err := ioutil.TempFile("", t.Name())
84+
f, err := os.CreateTemp("", t.Name())
8685
if err != nil {
8786
t.Fatalf("Failed to create tmp file: %v", err)
8887
}
@@ -102,7 +101,7 @@ func TestReadConfigFile(t *testing.T) {
102101
}
103102
}
104103
{
105-
f, err := ioutil.TempFile("", t.Name())
104+
f, err := os.CreateTemp("", t.Name())
106105
if err != nil {
107106
t.Fatalf("Failed to create tmp file: %v", err)
108107
}

go/base/load_map.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ func NewLoadMap() LoadMap {
2323

2424
// NewLoadMap parses a `--*-load` flag (e.g. `--max-load`), which is in multiple
2525
// key-value format, such as:
26-
// 'Threads_running=100,Threads_connected=500'
26+
//
27+
// 'Threads_running=100,Threads_connected=500'
2728
func ParseLoadMap(loadList string) (LoadMap, error) {
2829
result := NewLoadMap()
2930
if loadList == "" {

go/base/utils.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func ValidateConnection(db *gosql.DB, connectionConfig *mysql.ConnectionConfig,
6969
return "", err
7070
}
7171
extraPortQuery := `select @@global.extra_port`
72-
if err := db.QueryRow(extraPortQuery).Scan(&extraPort); err != nil { // nolint:staticcheck
72+
if err := db.QueryRow(extraPortQuery).Scan(&extraPort); err != nil { //nolint:staticcheck
7373
// swallow this error. not all servers support extra_port
7474
}
7575
// AliyunRDS set users port to "NULL", replace it by gh-ost param

go/binlog/gomysql_reader.go

+12-8
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import (
1313
"github.com/github/gh-ost/go/mysql"
1414
"github.com/github/gh-ost/go/sql"
1515

16+
"time"
17+
1618
gomysql "github.com/go-mysql-org/go-mysql/mysql"
1719
"github.com/go-mysql-org/go-mysql/replication"
1820
"golang.org/x/net/context"
@@ -36,14 +38,16 @@ func NewGoMySQLReader(migrationContext *base.MigrationContext) *GoMySQLReader {
3638
currentCoordinates: mysql.BinlogCoordinates{},
3739
currentCoordinatesMutex: &sync.Mutex{},
3840
binlogSyncer: replication.NewBinlogSyncer(replication.BinlogSyncerConfig{
39-
ServerID: uint32(migrationContext.ReplicaServerId),
40-
Flavor: gomysql.MySQLFlavor,
41-
Host: connectionConfig.Key.Hostname,
42-
Port: uint16(connectionConfig.Key.Port),
43-
User: connectionConfig.User,
44-
Password: connectionConfig.Password,
45-
TLSConfig: connectionConfig.TLSConfig(),
46-
UseDecimal: true,
41+
ServerID: uint32(migrationContext.ReplicaServerId),
42+
Flavor: gomysql.MySQLFlavor,
43+
Host: connectionConfig.Key.Hostname,
44+
Port: uint16(connectionConfig.Key.Port),
45+
User: connectionConfig.User,
46+
Password: connectionConfig.Password,
47+
TLSConfig: connectionConfig.TLSConfig(),
48+
UseDecimal: true,
49+
MaxReconnectAttempts: migrationContext.BinlogSyncerMaxReconnectAttempts,
50+
TimestampStringLocation: time.UTC,
4751
}),
4852
}
4953
}

0 commit comments

Comments
 (0)