-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
errno, infoschema, executor, server: add client error infoschema tables #20785
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
@breeswish, @lzmhhh123, @djshow832, PTAL. |
2 similar comments
@breeswish, @lzmhhh123, @djshow832, PTAL. |
@breeswish, @lzmhhh123, @djshow832, PTAL. |
We can revisit this for sprint 2. |
This pull request was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Issue Number: Fixes #14433
Problem Summary:
This adds support for
information_schema.client_errors_summary_*
tables. It addresses a gap in metrics where it might be a client that is causing an error. Potential issues that this could help find are:Client errors are different from server errors. The server should typically log when it encounters something unexpected or weird about its operation. But in this case, the server is probably operating as expected, it's the client that is behaving strange.
What is changed and how it works?
Three new information schema tables have been introduced:
The design is modeled loosely based on what MySQL 8.0 has in performance_schema. But there are the following differences to be aware of:
TRUNCATE TABLE
command. But since these are in infoschema in TiDB, a commandFLUSH CLIENT_ERRORS_SUMMARY
is added.errno
package - some are known not to be generated. Also, it creates a very large table if there are a lot of users or hosts.ERROR_MESSAGE (in sprintf format), not the
ERROR_NAME. This is a current limitation based on what is stored in the
errno` package. I think it's fine.ERROR_RAISED
/ERROR_HANDLED
counts, and the columns are just renamed toERROR_COUNT
. TiDB does not have stored procs, and thus no error handling.How it Works:
The errors and warnings could be generated anywhere in code. I capture them not at generate time, but as they are sent to the client. This means that internal sql execution that triggers warnings etc. is not logged.
Related changes
Check List
Tests
Side effects
tiup tpcc bench
to see how many client errors are generated, and it is only 1 during prepare.Release note