-
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
EXPERIMENTAL breaking down the vreplication flow #8044
EXPERIMENTAL breaking down the vreplication flow #8044
Conversation
Signed-off-by: Shlomi Noach <[email protected]>
This PR intentionally mixes multiple approaches, and intentionally prints out tons of log information. |
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
…lace into' are compatible with expected result Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
I am having a really hard time fixing the tests. Some of the tests expect specific sequence of queries to run on the database, and the whole point of this PR is that we change the sequence of queries, in an unpredictable way. This is one of the cases in the Vitess test framework where we should change from "test the queries" to "test the eventual data". But I find it overwhelming and I'm not sure where to begin. I feel like I'm stuck. |
…h concistsent snapshot, but table locks not acquired. In this setup we return a GTID which is >= row-select time, as opposed to <= row-select time in streamWithoutSnapshot Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
… represent the last gtid Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
EDIT: SOLVED One test that is failing on a logical issues is
Specifically:
where it seems an extra |
Signed-off-by: Shlomi Noach <[email protected]>
It was, after all, related to |
Signed-off-by: Shlomi Noach <[email protected]>
…uccessful run Signed-off-by: Shlomi Noach <[email protected]>
…old-style, single query SELECT with consistent snapshot and precise GTID pos, or multiple limited SELECTs with estimated GTID pos Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
…d in vcopier Signed-off-by: Shlomi Noach <[email protected]>
@@ -63,7 +63,7 @@ func TestExternalConnectorCopy(t *testing.T) { | |||
|
|||
expectDBClientAndVreplicationQueries(t, []string{ | |||
"begin", | |||
"insert into tab1(id,val) values (1,'a'), (2,'b')", | |||
"* into tab1(id,val) values (1,'a'), (2,'b')", |
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.
*
is a new "magic" prefix (like /
is a magic prefix) that indicates "this is expected to be a substring in the actual result"
@@ -527,6 +527,9 @@ func (tpb *tablePlanBuilder) generateInsertStatement() *sqlparser.ParsedQuery { | |||
func (tpb *tablePlanBuilder) generateInsertPart(buf *sqlparser.TrackedBuffer) *sqlparser.ParsedQuery { | |||
if tpb.onInsert == insertIgnore { | |||
buf.Myprintf("insert ignore into %v(", tpb.name) | |||
} else if tpb.onInsert == insertNormal { | |||
// the condition (tpb.onInsert == insertNormal) is true when there is no GROUP BY | |||
buf.Myprintf("replace into %v(", tpb.name) |
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.
Still WIP, replace into
is not valid in:
- Materialize, where GROUP BY is found
- Online DDL, where a UNIQUE KEY is added
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
I believe we will not be going down this particular path. I have thoughts on how to parallelize VReplication using the existing logic (with |
DO NOT MERGE
Description
This is an ongoing experiment in analyzing VReplicatiob behavior on large data and under load. Specifically we're looking to break down massive operations into smaller parts, and to be able to either parallelize or simplify some code; the target objective is:
Related Issue(s)
Writeup coming.
Checklist
Deployment Notes