-
Notifications
You must be signed in to change notification settings - Fork 288
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
dm: new router compatible with regular expression #4358
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
a2b8e8e
to
0040bdc
Compare
Codecov Report
Flags with carried forward coverage won't be shown. Click here to find out more. @@ Coverage Diff @@
## master #4358 +/- ##
================================================
+ Coverage 55.6402% 55.6477% +0.0075%
================================================
Files 494 507 +13
Lines 61283 62768 +1485
================================================
+ Hits 34098 34929 +831
- Misses 23750 24355 +605
- Partials 3435 3484 +49 |
2dcd595
to
3244936
Compare
/run-kafka-integration-test /tidb=pr/30558 |
/run-integration-test /tidb=pr/30558 |
@@ -25,12 +25,12 @@ import ( | |||
bf "github.com/pingcap/tidb-tools/pkg/binlog-filter" | |||
"github.com/pingcap/tidb-tools/pkg/column-mapping" | |||
"github.com/pingcap/tidb-tools/pkg/filter" | |||
router "github.com/pingcap/tidb-tools/pkg/table-router" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a question: why not pull a request to tidb-tools?
maybe i miss some offline talk infomation😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, nice suggestion. We're planning moving it to tidb-tools
to keep the table router aligned across all the project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Please resolve conflict
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rest lgtm
{ | ||
SchemaPattern: "~s?chema.*", | ||
TargetSchema: "test", | ||
TargetTable: "t2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this usage (no table-pattern but target-table) is strange, should we forbid it in future? @GMHDBJD @lichunzhu
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO we should forbid this kind of behavior
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if the users would like to migrate all tables from one or more designated schema(s) to exactly ONE table in downstream?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They should use TablePattern: "*"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But for now, missing field TablePattern
is permitted. Would it be troublesome if we forbid it, considering some users may need to modify their old configs?
ping @buchuitoudegou |
be529fc
to
795beaa
Compare
/run-all-tests |
/run-verify |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 85dd8ee
|
What problem does this PR solve?
implement new router that is compatible with regular expressions
Issue Number: close #4256
What is changed and how it works?
A new router that is compatible with regular expressions is implemented. It basically reused the
filter
module intidb-tools
project, which has also been used in theblock-allow-list
. Reusing the existing module ensures modules behaving the same across the whole project.Check List
Tests
Code changes
Side effects
Related changes
Release note