Skip to content

Redact arguments for Error#27

Merged
lysu merged 1 commit intopingcap:masterfrom
SunRunAway:logredact
Oct 15, 2020
Merged

Redact arguments for Error#27
lysu merged 1 commit intopingcap:masterfrom
SunRunAway:logredact

Conversation

@SunRunAway
Copy link

@SunRunAway SunRunAway commented Sep 27, 2020

pingcap/tidb#18566

  • changes in "github.com/pingcap/errors"
    • redact errors in Error.GenWithStackByArgs & Error.FastGenByArgs
  • changes in "github.com/pingcap/parser"
    • define mysql.Message to bind redactArgs which means which arguments of the error need to be redacted with each error message
    • MySQLErrName should be defined with mysql.Message.
    • ErrClass.NewStd considers redactArgs
    • All errors uses ErrClass.NewStd or mysql.Message to consider error redaction
  • changes in "github.com/pingcap/tidb"
    • inherit ErrClass.NewStd
    • All errors uses ErrClass.NewStd or mysql.Message to consider error redaction

@SunRunAway
Copy link
Author

/cc @crazycs520

@SunRunAway
Copy link
Author

/cc @ichn-hu

Copy link
Collaborator

@crazycs520 crazycs520 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Collaborator

@ichn-hu ichn-hu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants