-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
*: make errcheck work again #8795
Conversation
/rebuild |
@@ -74,7 +75,8 @@ func (o *outerJoinEliminator) isAggColsAllFromOuterTable(outerPlan LogicalPlan, | |||
} | |||
for _, col := range aggCols { | |||
columnName := &ast.ColumnName{Schema: col.DBName, Table: col.TblName, Name: col.ColName} | |||
if c, _ := outerPlan.Schema().FindColumn(columnName); c == nil { | |||
if c, err := outerPlan.Schema().FindColumn(columnName); c == nil { | |||
log.Debug(err) |
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.
I think debug level is too low.
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 error could be ignored @eurekaka
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 log is too simple.
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.
I prefer log.Warn(err)
for err which is not nil.
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.
Done
@@ -513,7 +513,9 @@ func (b *executorBuilder) buildShow(v *plannercore.Show) Executor { | |||
} | |||
if e.Tp == ast.ShowMasterStatus { | |||
// show master status need start ts. | |||
e.ctx.Txn(true) | |||
if _, err := e.ctx.Txn(true); err != nil { | |||
b.err = errors.Trace(err) |
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.
ditto.
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 error stack is critical here, I'd rather add more errors.Trace
!
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
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
What problem does this PR solve?
errcheck is moved to
check_slow
in #7240 and it is not used since then.As the title says, this PR recover the check, and now
make check
will check it by default.What is changed and how it works?
Use errcheck rather than the gometalint (it actually integrate errcheck) tool, because this way we can specify the errcheck_excludes.txt file to control what to be ignored.
Check List
Tests
Side effects
There is a known issue errcheck doesn't support module kisielk/errcheck#155
And it introduce a problem that TiDB must be put in GOPATH
This change is