-
Notifications
You must be signed in to change notification settings - Fork 10
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
VtGateV3 Lookup testcases #5
Conversation
Signed-off-by: Ajeet jain <ajeet@planetscale.com>
Signed-off-by: Ajeet jain <ajeet@planetscale.com>
Signed-off-by: Ajeet jain <ajeet@planetscale.com>
Signed-off-by: Ajeet jain <ajeet@planetscale.com>
@deepthi I still need to understand a few cases which I have commented out [We can discuss in our next syncup]. Besides that this PR is good to go. |
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.
Nice work! Looks good on a first pass.
I will look at the details in the spreadsheet and do a more thorough review once I get access to it.
Signed-off-by: Ajeet jain <ajeet@planetscale.com>
Thanks @deepthi There is 1 question/verification pending from my side where a duplicate insert into a unique column should fail, but it is not. I have added a TODO and will verify again when we have a new local cluster ready [Arindam is currently working on that]. This PR is good to merge now. |
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.
Looks good except for a few nit-picks.
|
||
// insert multiple values | ||
exec(t, conn, "begin") | ||
exec(t, conn, "insert into t3(user_id, lastname, address) values(1,'snow','castle_black'), (2,'stark','winterfell')") |
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.
haha
exec(t, conn, "insert into t3(user_id, lastname, address) values(1,'snow','castle_black'), (2,'stark','winterfell')") | ||
exec(t, conn, "commit") | ||
qr := exec(t, conn, "select * from t3") | ||
if got, want := fmt.Sprintf("%v", qr.Rows), "[[INT64(1) VARCHAR(\"snow\") VARCHAR(\"castle_black\")] [INT64(2) VARCHAR(\"stark\") VARCHAR(\"winterfell\")]]"; got != want { |
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 the order of rows expected to be stable?
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.
Added order by clause
go/vt/vtgate/endtoend/lookup_test.go
Outdated
t.Errorf("select:\n%v want\n%v", got, want) | ||
} | ||
|
||
//update both videxes |
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.
typo: vindexes
go/vt/vtgate/endtoend/lookup_test.go
Outdated
} | ||
} | ||
|
||
/* |
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.
Use // style doc comments instead of multi-line comments.
go/vt/vtgate/endtoend/lookup_test.go
Outdated
} | ||
} | ||
|
||
/* |
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.
Same comment as above.
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.
Can merge after addressing feedback.
Signed-off-by: Ajeet jain <ajeet@planetscale.com>
Addressed review comments, merging now. |
* decouple olap tx timeout from oltp tx timeout Since workload=olap bypasses the query timeouts (--queryserver-config-query-timeout) and also row limits, the natural assumption is that it also bypasses the transaction timeout. This is not the case, e.g. for a tablet where the --queryserver-config-transaction-timeout is 10. This commit: * Adds new CLI flag and YAML field to independently configure TX timeouts for OLAP workloads (--queryserver-config-olap-transaction-timeout). * Decouples TX kill interval from OLTP TX timeout via new CLI flag and YAML field (--queryserver-config-transaction-killer-interval). Signed-off-by: Max Englander <max@planetscale.com> * decouple ol{a,t}p tx timeouts: pr comments #1 Signed-off-by: Max Englander <max@planetscale.com> * decouple ol{a,t}p tx timeouts: pr comments #2 consolidate timeout logic in sc Signed-off-by: Max Englander <max@planetscale.com> * decouple ol{a,t}p tx timeouts: remove unused tx killer flag Signed-off-by: Max Englander <max@planetscale.com> * decouple ol{a,t}p tx timeouts: update 15_0_0_summary.md Signed-off-by: Max Englander <max@planetscale.com> * decouple ol{a,t}p tx timeouts: fix race cond Signed-off-by: Max Englander <max@planetscale.com> * decouple ol{a,t}p tx timeouts: pr comments #3 -txProps.timeout, +sc.expiryTime Signed-off-by: Max Englander <max@planetscale.com> * decouple ol{a,t}p tx timeouts: pr comments #4 -atomic.Value for expiryTime Signed-off-by: Max Englander <max@planetscale.com> * decouple ol{a,t}p tx timeouts: fix race cond (without atomic.Value) Signed-off-by: Max Englander <max@planetscale.com> * decouple ol{a,t}p tx timeouts: pr comments #5 -unused funcs, fix comments, set ticks interval once Signed-off-by: Max Englander <max@planetscale.com> * decouple ol{a,t}p tx timeouts: pr comments #5 +txkill tests Signed-off-by: Max Englander <max@planetscale.com> * revert fmt changes Signed-off-by: Max Englander <max@planetscale.com> * implement pr review suggestion Signed-off-by: Max Englander <max@planetscale.com> Signed-off-by: Max Englander <max@planetscale.com>
* decouple olap tx timeout from oltp tx timeout Since workload=olap bypasses the query timeouts (--queryserver-config-query-timeout) and also row limits, the natural assumption is that it also bypasses the transaction timeout. This is not the case, e.g. for a tablet where the --queryserver-config-transaction-timeout is 10. This commit: * Adds new CLI flag and YAML field to independently configure TX timeouts for OLAP workloads (--queryserver-config-olap-transaction-timeout). * Decouples TX kill interval from OLTP TX timeout via new CLI flag and YAML field (--queryserver-config-transaction-killer-interval). Signed-off-by: Max Englander <max@planetscale.com> * decouple ol{a,t}p tx timeouts: pr comments #1 Signed-off-by: Max Englander <max@planetscale.com> * decouple ol{a,t}p tx timeouts: pr comments #2 consolidate timeout logic in sc Signed-off-by: Max Englander <max@planetscale.com> * decouple ol{a,t}p tx timeouts: remove unused tx killer flag Signed-off-by: Max Englander <max@planetscale.com> * decouple ol{a,t}p tx timeouts: update 15_0_0_summary.md Signed-off-by: Max Englander <max@planetscale.com> * decouple ol{a,t}p tx timeouts: fix race cond Signed-off-by: Max Englander <max@planetscale.com> * decouple ol{a,t}p tx timeouts: pr comments #3 -txProps.timeout, +sc.expiryTime Signed-off-by: Max Englander <max@planetscale.com> * decouple ol{a,t}p tx timeouts: pr comments #4 -atomic.Value for expiryTime Signed-off-by: Max Englander <max@planetscale.com> * decouple ol{a,t}p tx timeouts: fix race cond (without atomic.Value) Signed-off-by: Max Englander <max@planetscale.com> * decouple ol{a,t}p tx timeouts: pr comments #5 -unused funcs, fix comments, set ticks interval once Signed-off-by: Max Englander <max@planetscale.com> * decouple ol{a,t}p tx timeouts: pr comments #5 +txkill tests Signed-off-by: Max Englander <max@planetscale.com> * fix flags Signed-off-by: Max Englander <max@planetscale.com> Signed-off-by: Max Englander <max@planetscale.com>
Migrated VtGateV3 lookup testcases from Python to Go.
Summary of tests:
Detail about each case is present in below sheet:
https://docs.google.com/spreadsheets/d/1fMv0ehVMeQNVvjl3HAzZ7LuHzRaIZrjwQrENF0O3iE8/edit#gid=0