Suppress invalid column errors in vtexplain#15272
Suppress invalid column errors in vtexplain#15272tycol7 wants to merge 1 commit intovitessio:mainfrom
vtexplain#15272Conversation
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 columnerrors invtexplain.After changing the way we encode queries,
vtexplainstarted showing these errors on routine executions:This repeated error causes
vtexplainto 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
handleSelectkicks off a series of steps, including inferring the column type, which isnullafter the change.This PR adds logic such that if we are in the special case of a
nullcolumn 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