-
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
Suppress invalid column errors in vtexplain
#15272
Suppress invalid column errors in vtexplain
#15272
Conversation
The column named `column_name` is a special case and should not be logged. Signed-off-by: Tyler Coleman <tyler@planetscale.com>
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
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #15272 +/- ##
=======================================
Coverage 67.46% 67.46%
=======================================
Files 1560 1561 +1
Lines 193186 193193 +7
=======================================
+ Hits 130333 130339 +6
- Misses 62853 62854 +1 ☔ View full report in Codecov by Sentry. |
If this changed, that was probably not intentional and that is what we need to fix and not suppress the logging? Isn't something now broken then in I feel like the actual underlying issue is not really understood well yet to know how this should be fixed? |
Alright, I found the actual cause of the |
Closing in favor of the actual fix in #15275. The logging here was correct, we did have a real problem as I suspected and we need to fix that underlying problem. |
Description
This PR suppresses unwanted
invalid column
errors invtexplain
.After changing the way we encode queries,
vtexplain
started showing these errors on routine executions:This repeated error causes
vtexplain
to significantly slow down. We get this error whenever the following query is executed:Previously, the above query evaluated to:
After the change, the query evaluates to:
and importantly, is now classified as a
SELECT
:vitess/go/vt/vtexplain/vtexplain_vttablet.go
Lines 577 to 583 in 54c6dfc
handleSelect
kicks off a series of steps, including inferring the column type, which isnull
after the change.This PR adds logic such that if we are in the special case of a
null
column type and the column name iscolumn_name
, do not log an error. Not logging an error reducesvtexplain
's runtime by several factors.This is a bug fix, and I think it should be backported.
Related Issue(s)
Fixes #15242
Checklist
Deployment Notes
N/A