-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
VReplication: Support passing VStream filters down to MySQL #17677
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Matt Lord <[email protected]>
Signed-off-by: Matt Lord <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
Signed-off-by: Matt Lord <[email protected]>
Signed-off-by: Matt Lord <[email protected]>
3c26c03
to
2eb85e4
Compare
Signed-off-by: Matt Lord <[email protected]>
2eb85e4
to
0a17436
Compare
Signed-off-by: Matt Lord <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17677 +/- ##
==========================================
- Coverage 67.75% 67.75% -0.01%
==========================================
Files 1587 1587
Lines 255780 255802 +22
==========================================
+ Hits 173310 173323 +13
- Misses 82470 82479 +9 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Matt Lord <[email protected]>
Signed-off-by: Matt Lord <[email protected]>
@@ -601,10 +610,6 @@ func (plan *Plan) analyzeWhere(vschema *localVSchema, where *sqlparser.Where) er | |||
if !ok { | |||
return fmt.Errorf("unexpected: %v", sqlparser.String(expr)) | |||
} | |||
// StrVal is varbinary, we do not support varchar since we would have to implement all collation types |
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 support was actually added here: #9549
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.
And it's tested in the new e2e test.
Signed-off-by: Matt Lord <[email protected]>
e4374be
to
087521f
Compare
Signed-off-by: Matt Lord <[email protected]>
087521f
to
b87608b
Compare
ab995b5
to
d708223
Compare
Signed-off-by: Matt Lord <[email protected]>
d708223
to
e9551de
Compare
Signed-off-by: Matt Lord <[email protected]>
Signed-off-by: Matt Lord <[email protected]>
Description
This PR fulfills the use cases in #17681 by pushing down any valid MySQL predicates in the provided Filter to MySQL in the query used for the copy phase. This PR does NOT alter the allowed filter expressions — with the exception that it removes a limitation excluding VARCHAR columns which is no longer applicable after #9549 — but it passes those allowed predicates down to MySQL in the query used to copy the rows from the given GTID/transaction snapshot before we then proceed to stream new binlog events which also match the given filters.
Note
I will open a website PR to document the options and limitations here: https://vitess.io/docs/22.0/reference/vreplication/vstream/#filter
Related Issue(s)
Checklist