-
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
Add option to GetSchema to only send the row count and data length over the wire #6985
Conversation
…er the wire Signed-off-by: Andrew Mason <amason@slack-corp.com>
A comment from @ameetkotian:
I think for now I'm just going to make the help text for |
Signed-off-by: Andrew Mason <amason@slack-corp.com>
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.
The change looks fine, but I'm debating whether you should be adding a test case. It will have to be an endtoend test, I think.
@vitessio/ps-vitess any opinions?
Signed-off-by: Andrew Mason <amason@slack-corp.com>
Signed-off-by: Andrew Mason <amason@slack-corp.com>
Signed-off-by: Andrew Mason <amason@slack-corp.com>
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
…er the wire (vitessio#6985) * Add option to GetSchema to only send the row count and data length over the wire Signed-off-by: Andrew Mason <amason@slack-corp.com> * Update help text to clarify behavior Signed-off-by: Andrew Mason <amason@slack-corp.com> * Add endtoend test for vtctl GetSchema Signed-off-by: Andrew Mason <amason@slack-corp.com> * Alias the proto imports Signed-off-by: Andrew Mason <amason@slack-corp.com> * Format imports to match vtctl.go Signed-off-by: Andrew Mason <amason@slack-corp.com>
If you are attempting to get aggregate table sizes across a keyspace, this requires one call to
GetSchema
per shard, which result in the caller to vtctl needing tojson2.Unmarshal
the same info (create table statement, column info) N times, when we know it's not going to change. This flag will allow a user to make oneGetSchema
call to get the schema, and then N-1GetSchema -table_sizes_only
calls for the rest of the shards, and results in much less data transfer and much faster (3-4x faster by some metrics I took) response times.Closes #6987