Skip to content

[WIP]Support moving table between different dbs/servers - #565

Closed
everpcpc wants to merge 8 commits into
github:masterfrom
everpcpc:move
Closed

everpcpc wants to merge 8 commits into
github:masterfrom
everpcpc:move

Conversation

@everpcpc

@everpcpc everpcpc commented Mar 30, 2018 •

Copy link
Copy Markdown

It is based on #557
Related issue: #417

Description

This PR adds support for moving a table between different databases as well as different servers.

It's a feature complete version. And I'm working on tests/docs.

@everpcpc everpcpc changed the title [WIP]Support moving table between different databases/servers [WIP]Support moving table between different dbs/servers Mar 30, 2018
@tomkrouper

Copy link
Copy Markdown

This is super exciting. Thanks for working on this.

@shlomi-noach

Copy link
Copy Markdown
Contributor

Wow, thank you!

Please note it will probably take me a few weeks, due to my timetable, to fully review this.

@shlomi-noach shlomi-noach self-assigned this Apr 8, 2018
@shlomi-noach
shlomi-noach self-requested a review April 8, 2018 09:46
Comment thread go/base/context.go
}

// SrcMasterIsAlsoReplica is `true` when the master and replica is the same on source
func (this *MigrationContext) SrcMasterIsAlsoReplica() bool {

@MOON-CLJ MOON-CLJ May 10, 2018 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

name SrcMasterIsAlsoReplica and DstMasterIsAlsoReplica are very strange,and "the master and replica is the same on source" not make sense。also "the master and replica is the same on destination"

@MOON-CLJ MOON-CLJ May 10, 2018 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

but names "src srcMaster dst dstMaster" is clear,i dont have better idea。

Comment thread go/logic/applier.go Outdated

applierUri := this.connectionConfig.GetDBUri(this.migrationContext.DatabaseName)
if this.db, _, err = mysql.GetDB(this.migrationContext.Uuid, applierUri); err != nil {
srcApplierURI := this.srcConnectionConfig.GetDBUri(this.migrationContext.SrcDatabaseName)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

srcApplierURI name should not contain "Applier",confirm to Inspector https://github.com/github/gh-ost/pull/565/files#diff-5aa50dde7ca1baf7a819eecf740ea220R51

Comment thread go/logic/applier.go Outdated
}

log.Infof("Creating changelog table %s.%s on src",
sql.EscapeName(this.migrationContext.DstDatabaseName),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this.migrationContext.DstDatabaseName seems should be this.migrationContext.SrcDatabaseName

@everpcpc everpcpc closed this Apr 3, 2022
@everpcpc
everpcpc deleted the move branch April 3, 2022 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants