-
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
[workflow] Add vreplication_log data to workflow protos, and VtctldServer.GetWorkflows
method
#8261
Conversation
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 looks really really great to me. I messed with it a bit locally and the data model is purrfect for what I need. 😈
The vexec/query planner parts seem straightforward to me, but you might want another set of eyes on the particularly Vitess-y parts. Up to you!
Thank youuuu!!!
// each _vt.vreplication row, we also sorted each ShardStreams | ||
// slice by ascending id, and our _vt.vreplication_log query | ||
// ordered by (stream_id ASC, id ASC), so we can walk the | ||
// streams in index order in O(n) amortized over all the rows |
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.
🤓
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
The intention here is that, for `vreplication_log` queries, we will want to have different `stream_id` bindvars for each target tablet in the query. Therefore in the next set of changes, we'll provided a second implementation of `QueryPlan` that allows a different query (with different bind vars) to be run on each target. Signed-off-by: Andrew Mason <[email protected]>
Signed-off-by: Andrew Mason <[email protected]>
Signed-off-by: Andrew Mason <[email protected]>
Signed-off-by: Andrew Mason <[email protected]>
Signed-off-by: Andrew Mason <[email protected]>
Signed-off-by: Andrew Mason <[email protected]>
4131b2d
to
24b84a4
Compare
[workflow] Add vreplication_log data to workflow protos, and `VtctldServer.GetWorkflows` method Signed-off-by: Andrew Mason <[email protected]>
[workflow] Add vreplication_log data to workflow protos, and `VtctldServer.GetWorkflows` method Signed-off-by: Andrew Mason <[email protected]>
Description
This enhances the
GetWorkflows
endpoint in VtcltdServer to also, on a best-effort basis, query the_vt.vreplication_log
table for all streams involved in each workflow. On tablets that are running with older versions of vitess (which do not have the log table), then the log fetch queries should fail, and we will setLogFetchError
on each stream in each workflow in the response, but the overall RPC will still be non-error.Here is this change running, accessed via vtadmin, on the
303_reshard
local example:Related Issue(s)
Closes #8260
Checklist
Deployment Notes