Skip to content

Drainer support plugin framework#911

Open
tsthght wants to merge 65 commits into
pingcap:pluginfrom
tsthght:plugin
Open

Drainer support plugin framework#911
tsthght wants to merge 65 commits into
pingcap:pluginfrom
tsthght:plugin

Conversation

@tsthght
Copy link
Copy Markdown
Contributor

@tsthght tsthght commented Feb 25, 2020

What problem does this PR solve?

Drainer support plugin, #886

What is changed and how it works?

Add plugin framework to drainer, user can customize plugins, and use parameter plugin-name , plugin-path and support-plugin to load plugin into drainer.

Check List

Tests

  • Unit test

@tsthght tsthght changed the title Plugin Drainer support plugin framework Feb 25, 2020
Comment thread drainer/config.go Outdated
Comment thread drainer/syncer.go
Comment thread drainer/syncer.go Outdated
Comment thread pkg/loader/executor.go Outdated
@WangXiangUSTC
Copy link
Copy Markdown
Contributor

thanks @tsthght

Comment thread drainer/syncer.go Outdated
Comment thread pkg/plugin/plugins.go Outdated
Comment thread pkg/plugin/plugins.go Outdated
Comment thread drainer/loopbacksync/loopbacksync.go Outdated
@hound hound Bot deleted a comment from tsthght Mar 11, 2020
@hound hound Bot deleted a comment from tsthght Mar 11, 2020
Copy link
Copy Markdown
Contributor

@WangXiangUSTC WangXiangUSTC left a comment

Choose a reason for hiding this comment

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

rest LGTM

Comment thread drainer/isyncer.go
Comment thread drainer/loopbacksync/loopbacksync.go Outdated
func CreateMarkTable(db *sql.DB, mdbname, mtablename string) error {
// CreateMarkDBDDL is DDL to create the database of mark table.
var err error
var CreateMarkDBDDL = fmt.Sprintf("create database IF NOT EXISTS %s;", mdbname)
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.

how about use createMarkDBDDL because it is a variable in function now?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I had fixed it.

Comment thread drainer/syncer.go
Comment thread drainer/syncer.go
Comment thread pkg/loader/executor.go
@WangXiangUSTC
Copy link
Copy Markdown
Contributor

LGTM

@WangXiangUSTC
Copy link
Copy Markdown
Contributor

@july2993 PTAL

@ti-chi-bot
Copy link
Copy Markdown
Member

@tsthght: PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants