Skip to content

Only allow -switch-to-rbr when inspecting replica #999

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

Open
wants to merge 82 commits into
base: master
Choose a base branch
from

Conversation

shlomi-noach
Copy link
Contributor

Resubmission of openark#23 from downstream

Fixes #991

gh-ost will fail with error when -switch-to-rbr is provided and when running directly on primary (--allow-on-master).

Low risk

No changes to migration logic, just added command line validation

Support a complete ALTER TABLE statement in --alter
Initial commit: towards setting up a test suite

Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
…original table, applying AUTO_INCREMENT value onto ghost table if applicable and user has not specified AUTO_INCREMENT in alter statement
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Copying AUTO_INCREMENT value to ghost table
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Generated column as part of UNIQUE (or PRIMARY) KEY
Cut-over should wait for heartbeat lag to be low enough to succeed
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
All MySQL DBs limited to max 3 concurrent/idle connections
…context

Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
hooks: reporting GH_OST_ETA_SECONDS. ETA as part of migration context
shlomi-noach and others added 14 commits October 26, 2021 12:06
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Support tables with existing zero dates
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
@timvaillancourt timvaillancourt added this to the v1.1.5 milestone Jun 2, 2022
@timvaillancourt timvaillancourt self-requested a review June 2, 2022 22:40
timvaillancourt
timvaillancourt previously approved these changes Jun 2, 2022
Copy link
Collaborator

@timvaillancourt timvaillancourt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👋/:pray: @shlomi-noach, sorry for the delay!

LGTM once this is rebased 👍. Currently can't merge

dm-2
dm-2 previously approved these changes Jul 6, 2022
@dm-2 dm-2 modified the milestones: v1.1.5, v1.1.6 Jul 6, 2022
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
@shlomi-noach
Copy link
Contributor Author

shlomi-noach commented Aug 21, 2022

The golangci-lint test fails, with what seems like useless output?

2022-08-21T05:54:12.7308332Z ##[group]run golangci-lint
2022-08-21T05:54:12.7312245Z Running [/home/runner/golangci-lint-1.46.2-linux-amd64/golangci-lint run --out-format=github-actions] in [] ...
2022-08-21T05:54:26.8253755Z ##[error]unnecessary trailing newline (whitespace)
2022-08-21T05:54:26.8266486Z ##[error]unnecessary trailing newline (whitespace)
2022-08-21T05:54:26.8267648Z ##[error]unnecessary trailing newline (whitespace)
2022-08-21T05:54:26.8268825Z ##[error]S1011: should replace loop with `result.columns = append(result.columns, columns1.Columns()...)` (gosimple)
2022-08-21T05:54:26.8270059Z ##[error]S1011: should replace loop with `result.columns = append(result.columns, columns2.Columns()...)` (gosimple)

I'm actually unable to find where exactly the linter sees the issue?

@timvaillancourt
Copy link
Collaborator

timvaillancourt commented Aug 21, 2022

I'm actually unable to find where exactly the linter sees the issue?

@shlomi-noach thanks! Yikes, that output isn't so useful 🤔

This check-annotations page has much more useful output and clicking on each nit jumps to the code (TIL 🚀): https://github.com/github/gh-ost/actions/runs/2897390310. It looks like it's mad about some extra whitespace and 2 x loops that could be simplified to append(something, other...) 👍

@timvaillancourt timvaillancourt dismissed stale reviews from dm-2 and themself via e7d9342 October 21, 2022 15:47
@timvaillancourt timvaillancourt modified the milestones: v1.1.6, v1.1.7 Dec 7, 2023
@meiji163 meiji163 modified the milestones: v1.1.7, v1.1.8 Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Documentation - switching to row based replication and data loss
5 participants