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

tool sync from kafka to mysql #441

Merged
merged 10 commits into from
Jan 30, 2019
Merged

tool sync from kafka to mysql #441

merged 10 commits into from
Jan 30, 2019

Conversation

july2993
Copy link
Contributor

@july2993 july2993 commented Jan 10, 2019

What problem does this PR solve?

relate issue: https://internal.pingcap.net/jira/browse/TOOL-771
you can read READMD first

What is changed and how it works?

add a tool named arbiter now
this pr also fix make check wiil add to CI if this is merged

Check List

Tests

  • Unit test
  • Manual test (add detailed scripts or steps below)
    run TiDB + drainer ( dest-type = kafka)
    run Arbiter Server (kill -9 per minute and restart)
    continue run tests/binlog again and again

Code changes

Side effects

Related changes

@july2993 july2993 force-pushed the hjh/ntools branch 2 times, most recently from dbe3d66 to 681458d Compare January 15, 2019 10:45
@IANTHEREAL
Copy link
Collaborator

IANTHEREAL commented Jan 21, 2019

is it reviewable now?

@july2993 july2993 changed the base branch from hjh/loader to master January 21, 2019 06:59
@july2993
Copy link
Contributor Author

@GregoryIan @WangXiangUSTC PTAL

Copy link
Contributor

@kennytm kennytm left a comment

Choose a reason for hiding this comment

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

The arbiter/arbiter.png contains a cursor. Please fix it.

@july2993
Copy link
Contributor Author

@kennytm @WangXiangUSTC @GregoryIan PTAL

Arbiter
==========

**Arbiter** 是一个从 Kafka 获取 Binlog 增量同步数据到 TiDB 的工具.
Copy link
Collaborator

Choose a reason for hiding this comment

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

English document?

Copy link
Collaborator

Choose a reason for hiding this comment

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

同步数据到 TiDB/MySQL 的工具

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Chinese first? after LGTM add add Englist?

Copy link
Collaborator

Choose a reason for hiding this comment

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

ok,but you use english document to replace it? write more english, speak more english 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

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

add eng version while 44b1b1c

@IANTHEREAL
Copy link
Collaborator

question about binlog component: do we filter binlog at drainer , or drainer and arbiter?

Copy link
Collaborator

@IANTHEREAL IANTHEREAL left a comment

Choose a reason for hiding this comment

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

besides I need to learn your design clearly, Rest LGTM.

@july2993
Copy link
Contributor Author

question about binlog component: do we filter binlog at drainer , or drainer and arbiter?

drainer support, arbiter don't support now

return 0, 0, errors.NotFoundf("no checkpoint for: %s", c.topicName)
}

return
Copy link
Contributor

Choose a reason for hiding this comment

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

need check rows.Err()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

- ts: the timestamp checkpoint
- status:
* 0
if quit normally, all Binlog data <= ts has synced to downstream.
Copy link
Contributor

Choose a reason for hiding this comment

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

how about status = 0 and quit unexpectedly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we guarantee
if status = 0, all Binlog data <= ts has synced to downstream and no later data synced partially.


写下游需时的直方图。标签:

* **type**: `exec` `commit` 执行 SQL 跟提交时的花时。
Copy link
Contributor

Choose a reason for hiding this comment

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

花时 -> 所消耗的时间?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

use 耗时 for simple?

@IANTHEREAL
Copy link
Collaborator

LGTM

@july2993
Copy link
Contributor Author

/run-all-tests

WangXiangUSTC
WangXiangUSTC previously approved these changes Jan 30, 2019
Copy link
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.

LGTM

@july2993
Copy link
Contributor Author

/run-all-tests

1 similar comment
@july2993
Copy link
Contributor Author

/run-all-tests

@WangXiangUSTC
Copy link
Contributor

/run-all-tests

1 similar comment
@july2993
Copy link
Contributor Author

/run-all-tests

@july2993 july2993 merged commit 535e6e2 into master Jan 30, 2019
@july2993 july2993 deleted the hjh/ntools branch January 30, 2019 09:05
WangXiangUSTC pushed a commit that referenced this pull request Feb 27, 2019
july2993 added a commit that referenced this pull request Feb 27, 2019
july2993 added a commit that referenced this pull request Feb 27, 2019
july2993 added a commit that referenced this pull request Feb 27, 2019
* tool sync from kafka to mysql (#441)

* Makefile: remove arbiter from build target
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.

4 participants