-
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
Vtgate metrics: Added plan and query type metrics #17727
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Harshit Gangal <[email protected]>
Signed-off-by: Harshit Gangal <[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: Harshit Gangal <[email protected]>
Signed-off-by: Harshit Gangal <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17727 +/- ##
========================================
Coverage 67.95% 67.96%
========================================
Files 1586 1586
Lines 255208 255373 +165
========================================
+ Hits 173423 173560 +137
- Misses 81785 81813 +28 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Harshit Gangal <[email protected]>
Signed-off-by: Harshit Gangal <[email protected]>
…st for metrics Signed-off-by: Harshit Gangal <[email protected]>
…nd using lookup vindex as lookup plan type Signed-off-by: Harshit Gangal <[email protected]>
Signed-off-by: Harshit Gangal <[email protected]>
Website Doc PR: vitessio/website#1935 |
I understand that we can't re-use QueriesProcessed and QueriesRouted, because that might break people's dashboards, but we need to come up with some other names for QueryProcessed and QueryRouted which are grammatical. Leaving this comment as a place-holder while I try to think of alternatives. |
… for Set and Show Execution commands Signed-off-by: Harshit Gangal <[email protected]>
Signed-off-by: Harshit Gangal <[email protected]>
Signed-off-by: Harshit Gangal <[email protected]>
Signed-off-by: Harshit Gangal <[email protected]>
Signed-off-by: Harshit Gangal <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
Description
This PR adds classification of query plans based on their execution strategy.
Additionally, this PR introduces a new metrics counter,
QueryProcessed
, which tracks queries processed at VTGate with labels for Query, Plan, and Tablet type. This metric provides better observability into query distribution and execution patternsPlan Classification
Query plans are categorized into different types based on their execution behavior:
Local
– Queries executed locally on VTGate without involving any shard.Passthrough
– Queries forwarded to single shard without having any additional processing at VTGate.MultiShard
– Queries executed across multiple shards with controlled routing.Lookup
– Queries using lookup vindexes to resolve keyspace IDs efficiently and route to specific shards.Scatter
– Queries broadcast to all shards.JoinOp
– Queries involving join operations across multiple shards, with Join on VTGate.ForeignKey
– Queries handling foreign key constraints, such as cascades and validations.Complex
– Queries with intricate execution logic requiring VTGate to process results.OnlineDDL
– DDLs executed though Online Schema change workflow.DirectDDL
– DDLs directly executed on the shards.Transaction
– Queries managing transactions, including BEGIN, COMMIT, ROLLBACK, and SAVEPOINT.Topology
- Queries that involves accessing Topology Server for Get/Put.Published Metrics
Sample metrics from VTGate's
/metrics
path:Related Issue(s)
Checklist