Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double the time waiting post replication restart #1421

Open
wants to merge 36 commits into
base: release-1.1.6
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
fe9d8d1
fix: typo (#1331)
testwill Dec 7, 2023
fa12f44
Remove stale RELEASE_VERSION file (#1349)
timvaillancourt Dec 7, 2023
b22229f
Force index in unique key range queries (#1237)
timvaillancourt Dec 7, 2023
d90112c
Include git commit in version (#1347)
timvaillancourt Dec 8, 2023
347d8e0
Fix tokens in inspector logging (#1226)
timvaillancourt Dec 8, 2023
5ebb953
Cleanup whitespace and comments in SQL query text (#1246)
timvaillancourt Dec 8, 2023
679d39e
Fix `--version` output (#1352)
timvaillancourt Dec 11, 2023
462930f
Update to `go1.21` (#1351)
timvaillancourt Dec 11, 2023
8f9c384
Replace deprecated `github.com/satori/go.uuid` lib (#1354)
timvaillancourt Dec 11, 2023
59fd18d
Add `CODEOWNERS` file to auto-request reviews (#1350)
timvaillancourt Dec 12, 2023
11d66d8
Fix successive failures error in streamer (#1371)
timvaillancourt Jan 23, 2024
51c1a21
Update CODEOWNERS
dm-2 Jan 31, 2024
a6cddf9
Print status to migration context logging after escaping % character …
icyflame Jan 31, 2024
6f09ee0
Merge branch 'master' into update-codeowners
dm-2 Jan 31, 2024
3aa6912
Merge pull request #1375 from github/update-codeowners
dm-2 Jan 31, 2024
b1aae87
Add `cpu-profile` interactive command (#1358)
timvaillancourt Jan 31, 2024
aa010a0
Support to config charset and collation (#1368)
shaohk Mar 12, 2024
17149b9
Add Dependabot config file (#1213)
sentinel Mar 12, 2024
a05f32f
Bump CodeQL actions (#1391)
dependabot[bot] Mar 12, 2024
6b3c6ba
Bump actions/setup-go from 4 to 5 (#1395)
dependabot[bot] Mar 12, 2024
27a672d
Bump golangci/golangci-lint-action from 3 to 4 (#1392)
dependabot[bot] Mar 12, 2024
9ca2499
Update pinned deps (#1355)
timvaillancourt Mar 12, 2024
48b34bc
Fix binlog end log pos over lost data (#1367)
shaohk Mar 12, 2024
bc6cd55
Update the description of the max-lag-millis in docs (#1388)
dontstopbelieveing Mar 12, 2024
c681f61
Add `--mysql-wait-timeout` flag (#1401)
timvaillancourt Apr 8, 2024
329b13d
Add doc for PR #1401 (#1403)
timvaillancourt Apr 9, 2024
e6c198c
Update to go1.22, update core deps to latest-stable (#1404)
timvaillancourt Apr 10, 2024
8d99e46
chore: fix function names in comment (#1405)
mountcount Apr 14, 2024
e87e2ab
Bump golangci/golangci-lint-action from 4 to 6 (#1414)
dependabot[bot] May 7, 2024
59db6fa
chore: fix some function names (#1417)
overallteach Jun 2, 2024
ef238ee
Double the time waiting post replication restart
andyedison Jun 11, 2024
1e1fbcb
Ensure `-attempt-instant-ddl` respects `-execute` flag (#1440)
timvaillancourt Aug 14, 2024
48cb9ab
Refine `wait_timeout` override to be at cut-over only (#1406)
timvaillancourt Aug 15, 2024
1e25e71
Add logic to ensure replication has started instead of assuming it ha…
andyedison Oct 14, 2024
df7fba3
Revert unintended change
andyedison Oct 14, 2024
ea5708e
Merge branch 'master' into adjust-wait-post-repl-restart
andyedison Oct 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @rashiq @meiji163 @timvaillancourt
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@ on: [pull_request]
jobs:
build:

runs-on: ubuntu-20.04
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v1
uses: actions/setup-go@v5
with:
go-version: 1.17
go-version-file: go.mod

- name: Build
run: script/cibuild

- name: Upload gh-ost binary artifact
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: gh-ost
path: bin/gh-ost
14 changes: 10 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@ name: "CodeQL analysis"

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '0 0 * * 0'
- cron: '25 22 * * 6'

jobs:
codeql:
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
Expand All @@ -16,10 +22,10 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
10 changes: 5 additions & 5 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.17
- uses: actions/checkout@v3
go-version-file: go.mod
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v6
with:
version: v1.46.2
version: v1.54.2
6 changes: 3 additions & 3 deletions .github/workflows/replica-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:
version: [mysql-5.7.25,mysql-8.0.16,PerconaServer-8.0.21]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v1
uses: actions/setup-go@v5
with:
go-version: 1.17
go-version-file: go.mod

- name: migration tests
env:
Expand Down
9 changes: 2 additions & 7 deletions Dockerfile.packaging
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
FROM golang:1.17-stretch

# Update stretch repositories
RUN sed -i -e 's/deb.debian.org/archive.debian.org/g' \
-e 's|security.debian.org|archive.debian.org/|g' \
-e '/stretch-updates/d' /etc/apt/sources.list
FROM golang:1.22-bullseye

RUN apt-get update
RUN apt-get install -y ruby ruby-dev rubygems build-essential
RUN gem install --no-ri --no-rdoc fpm
RUN gem install fpm
ENV GOPATH=/tmp/go

RUN apt-get install -y curl
Expand Down
7 changes: 1 addition & 6 deletions Dockerfile.test
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
FROM golang:1.17-stretch
FROM golang:1.22-bullseye
LABEL maintainer="[email protected]"

#Update stretch repositories
RUN sed -i -e 's/deb.debian.org/archive.debian.org/g' \
-e 's|security.debian.org|archive.debian.org/|g' \
-e '/stretch-updates/d' /etc/apt/sources.list

RUN apt-get update
RUN apt-get install -y lsb-release
RUN rm -rf /var/lib/apt/lists/*
Expand Down
1 change: 0 additions & 1 deletion RELEASE_VERSION

This file was deleted.

8 changes: 6 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,18 @@ main() {
RELEASE_VERSION=$(git describe --abbrev=0 --tags | tr -d 'v')
fi
if [ -z "${RELEASE_VERSION}" ] ; then
RELEASE_VERSION=$(cat RELEASE_VERSION)
echo "RELEASE_VERSION must be set"
exit 1
fi

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

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

mkdir -p ${buildpath}
rm -rf ${buildpath:?}/*
Expand Down
4 changes: 2 additions & 2 deletions doc/azure.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ gh-ost \
--master-user="master-user-name" \
--master-password="master-password" \
--assume-rbr \
[-- other paramters you need]
[-- other parameters you need]
```


[new_issue]: https://github.com/github/gh-ost/issues/new
[assume_rbr_docs]: https://github.com/github/gh-ost/blob/master/doc/command-line-flags.md#assume-rbr
[migrate_test_on_replica_docs]: https://github.com/github/gh-ost/blob/master/doc/cheatsheet.md#c-migratetest-on-replica
[migrate_test_on_replica_docs]: https://github.com/github/gh-ost/blob/master/doc/cheatsheet.md#c-migratetest-on-replica
5 changes: 5 additions & 0 deletions doc/command-line-flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ When using [Connect to replica, migrate on master](cheatsheet.md#a-connect-to-re

When [`--throttle-control-replicas`](#throttle-control-replicas) is provided, throttling also considers lag on specified hosts. Lag measurements on listed hosts is done by querying `gh-ost`'s _changelog_ table, where `gh-ost` injects a heartbeat.

When using on master or when `--allow-on-master` is provided, `max-lag-millis` is also considered a threshold for starting the cutover stage of the migration. If the row copy is complete and the heartbeat lag is less than `max-lag-millis` cutover phase of the migration will start.

See also: [Sub-second replication lag throttling](subsecond-lag.md)

### max-load
Expand Down Expand Up @@ -261,6 +263,9 @@ But RocksDB currently lacks a few features support compared to InnoDB:

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

### charset
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.

### test-on-replica

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)
Expand Down
1 change: 1 addition & 0 deletions doc/interactive-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Both interfaces may serve at the same time. Both respond to simple text command,
- `help`: shows a brief list of available commands
- `status`: returns a detailed status summary of migration progress and configuration
- `sup`: returns a brief status summary of migration progress
- `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
- `coordinates`: returns recent (though not exactly up to date) binary log coordinates of the inspected server
- `applier`: returns the hostname of the applier
- `inspector`: returns the hostname of the inspector
Expand Down
1 change: 0 additions & 1 deletion doc/local-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ Tests are found under [localtests](https://github.com/github/gh-ost/tree/master/
New data-integrity, synchronization issues or otherwise concerns are expected to be tested by new test cases.

While this is merged work is still ongoing.

24 changes: 11 additions & 13 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
module github.com/github/gh-ost

go 1.17
go 1.22.0

require (
github.com/go-ini/ini v1.62.0
github.com/go-mysql-org/go-mysql v1.3.0
github.com/go-sql-driver/mysql v1.6.0
github.com/go-ini/ini v1.67.0
github.com/go-mysql-org/go-mysql v1.7.0
github.com/go-sql-driver/mysql v1.8.1
github.com/google/uuid v1.6.0
github.com/openark/golib v0.0.0-20210531070646-355f37940af8
github.com/satori/go.uuid v1.2.0
golang.org/x/net v0.17.0
golang.org/x/term v0.13.0
golang.org/x/text v0.13.0
golang.org/x/net v0.24.0
golang.org/x/term v0.19.0
golang.org/x/text v0.14.0
)

require (
github.com/pingcap/errors v0.11.5-0.20201126102027-b0a155152ca3 // indirect
filippo.io/edwards25519 v1.1.0 // indirect
github.com/pingcap/errors v0.11.5-0.20210425183316-da1aaba5fb63 // indirect
github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24 // indirect
github.com/siddontang/go v0.0.0-20180604090527-bdc77568d726 // indirect
github.com/siddontang/go-log v0.0.0-20180807004314-8d05993dda07 // indirect
github.com/smartystreets/goconvey v1.6.4 // indirect
go.uber.org/atomic v1.7.0 // indirect
golang.org/x/sys v0.13.0 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/ini.v1 v1.62.0 // indirect
golang.org/x/sys v0.19.0 // indirect
)
Loading