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

refactor cutover for MySQL 8.x rename feature && support OceanBase #1434

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

whhe
Copy link
Contributor

@whhe whhe commented Jul 19, 2024

A Pull Request should be associated with an Issue.

Close #1433 Close #1427

Description

This PR is based on #715 by @shlomi-noach. There is a new option --oceanbase which is introduced for OceanBase Binlog Service, just like the azure and gcp options. This PR would also change the behavior of the atomic cut over on MySQL 8.0.13 and later versions, please let me know if anyone have concerns about it.

In case this PR introduced Go code changes:

  • contributed code is using same conventions as original code
  • script/cibuild returns with no formatting errors, build errors or unit test errors.

@whhe whhe force-pushed the ob-compatibility branch 2 times, most recently from ae2d7b8 to 13889d3 Compare July 19, 2024 10:15
@whhe whhe changed the title support OceanBase Binlog Service with new cut over function refactor cutover for MySQL 8.x rename feature && support OceanBase Nov 20, 2024
@meiji163
Copy link
Contributor

Is this comment by Schlomi still relevant @whhe?

This complicates matters. I can't just place a lock on both tables, since I want to be able to keep writing to the ghost table what remains in the binary logs after having locked the original table. The only way to be able to do so is if the same connection which places the lock would be the one to apply the remaining events; this is doable but non trivial.

It looks like atomicCutOverMySQL8 still waits for the applier to finish the DML events up to the lock, while the table is locked with singletonDB

@whhe
Copy link
Contributor Author

whhe commented Nov 22, 2024

@meiji163 I added LockGhostTable after waitForEventsUpToLock, so it should lock the ghost table with singletonDB after all events are applied to the ghost table.

I removed the command-line flag oceanbase, it could be replaced by the new validateOceanBaseConnection function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants