-
Notifications
You must be signed in to change notification settings - Fork 762
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
Fix auto_increment metric collection errors caused by using collation in INFORMATION_SCHEMA searches #833
Merged
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
文件系统大小写敏感,数据库参数lower_case_file_system=off,lower_case_file_system=0的情况下,两张大小写不同的x和X表的数据会分别重复出现两次。(这里是因为联表查询大小写不敏感,是因为会用Open_full_table会用到默认的校对规则。) 导致抓取数据的时候失败,采集不到该节点的相关指标。 Signed-off-by: Nicole Chen <51746100+nicolevv@users.noreply.github.com>
SuperQ
approved these changes
Aug 29, 2024
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.
Good find, thanks!
cristiangreco
added a commit
to grafana/mysqld_exporter
that referenced
this pull request
Nov 8, 2024
Changes: * [FEATURE] Support for prometheus scrape timeout in probe endpoint prometheus#828 * [ENHANCEMENT] Support MySQL 8.4 replicas syntax prometheus#837 * [ENHANCEMENT] Fetch lock time and cpu time from performance schema prometheus#862 * [ENHANCEMENT] Add the instance struct to handle connections prometheus#859 * [ENHANCEMENT] Optimize code by using built-in constants in the standard lib prometheus#844 * [BUGFIX] Fix fetching tmpTables vs tmpDiskTables from performance_schema prometheus#853 * [BUGFIX] Skip SPACE_TYPE column for MariaDB >=10.5 prometheus#860 * [BUGFIX] Fixed parsing of timestamps with non-zero padded days prometheus#841 * [BUGFIX] Fix auto_increment metric collection errors caused by using collation in INFORMATION_SCHEMA searches prometheus#833 * [BUGFIX] Fix race condition in ReloadConfig prometheus#760 * [BUGFIX] Change processlist query to support ONLY_FULL_GROUP_BY sql_mode prometheus#684 * [BUGFIX] replication_applier_status_by_worker requires mysql 8.0 prometheus#683 * [BUGFIX] Update docker registry link in README.md prometheus#813 * [BUGFIX] Fix Docker run command and update documentation for cnf file handling prometheus#843
Merged
cristiangreco
added a commit
to grafana/mysqld_exporter
that referenced
this pull request
Nov 8, 2024
Changes: * [FEATURE] Support for prometheus scrape timeout in probe endpoint prometheus#828 * [ENHANCEMENT] Support MySQL 8.4 replicas syntax prometheus#837 * [ENHANCEMENT] Fetch lock time and cpu time from performance schema prometheus#862 * [ENHANCEMENT] Add the instance struct to handle connections prometheus#859 * [ENHANCEMENT] Optimize code by using built-in constants in the standard lib prometheus#844 * [BUGFIX] Fix fetching tmpTables vs tmpDiskTables from performance_schema prometheus#853 * [BUGFIX] Skip SPACE_TYPE column for MariaDB >=10.5 prometheus#860 * [BUGFIX] Fixed parsing of timestamps with non-zero padded days prometheus#841 * [BUGFIX] Fix auto_increment metric collection errors caused by using collation in INFORMATION_SCHEMA searches prometheus#833 * [BUGFIX] Fix race condition in ReloadConfig prometheus#760 * [BUGFIX] Change processlist query to support ONLY_FULL_GROUP_BY sql_mode prometheus#684 * [BUGFIX] replication_applier_status_by_worker requires mysql 8.0 prometheus#683 * [BUGFIX] Update docker registry link in README.md prometheus#813 * [BUGFIX] Fix Docker run command and update documentation for cnf file handling prometheus#843 Signed-off-by: Cristian Greco <cristian@regolo.cc>
cristiangreco
added a commit
to grafana/mysqld_exporter
that referenced
this pull request
Nov 8, 2024
Changes: * [FEATURE] Support for prometheus scrape timeout in probe endpoint prometheus#828 * [ENHANCEMENT] Support MySQL 8.4 replicas syntax prometheus#837 * [ENHANCEMENT] Fetch lock time and cpu time from performance schema prometheus#862 * [ENHANCEMENT] Add the instance struct to handle connections prometheus#859 * [ENHANCEMENT] Optimize code by using built-in constants in the standard lib prometheus#844 * [BUGFIX] Fix fetching tmpTables vs tmpDiskTables from performance_schema prometheus#853 * [BUGFIX] Skip SPACE_TYPE column for MariaDB >=10.5 prometheus#860 * [BUGFIX] Fixed parsing of timestamps with non-zero padded days prometheus#841 * [BUGFIX] Fix auto_increment metric collection errors caused by using collation in INFORMATION_SCHEMA searches prometheus#833 * [BUGFIX] Fix race condition in ReloadConfig prometheus#760 * [BUGFIX] Change processlist query to support ONLY_FULL_GROUP_BY sql_mode prometheus#684 * [BUGFIX] replication_applier_status_by_worker requires mysql 8.0 prometheus#683 * [BUGFIX] Update docker registry link in README.md prometheus#813 * [BUGFIX] Fix Docker run command and update documentation for cnf file handling prometheus#843 Signed-off-by: Cristian Greco <cristian@regolo.cc>
cristiangreco
added a commit
to grafana/mysqld_exporter
that referenced
this pull request
Nov 8, 2024
Changes: * [CHANGE] Replace logging library go-kit/log with slog prometheus#885 * [FEATURE] Support for prometheus scrape timeout in probe endpoint prometheus#828 * [ENHANCEMENT] Support MySQL 8.4 replicas syntax prometheus#837 * [ENHANCEMENT] Fetch lock time and cpu time from performance schema prometheus#862 * [ENHANCEMENT] Add the instance struct to handle connections prometheus#859 * [ENHANCEMENT] Optimize code by using built-in constants in the standard lib prometheus#844 * [BUGFIX] Fix fetching tmpTables vs tmpDiskTables from performance_schema prometheus#853 * [BUGFIX] Skip SPACE_TYPE column for MariaDB >=10.5 prometheus#860 * [BUGFIX] Fixed parsing of timestamps with non-zero padded days prometheus#841 * [BUGFIX] Fix auto_increment metric collection errors caused by using collation in INFORMATION_SCHEMA searches prometheus#833 * [BUGFIX] Fix race condition in ReloadConfig prometheus#760 * [BUGFIX] Change processlist query to support ONLY_FULL_GROUP_BY sql_mode prometheus#684 * [BUGFIX] replication_applier_status_by_worker requires mysql 8.0 prometheus#683 * [BUGFIX] Update docker registry link in README.md prometheus#813 * [BUGFIX] Fix Docker run command and update documentation for cnf file handling prometheus#843 * [BUGFIX] info_schema_tables: do not collect the sys schema prometheus#879 Signed-off-by: Cristian Greco <cristian@regolo.cc>
cristiangreco
added a commit
to grafana/mysqld_exporter
that referenced
this pull request
Nov 8, 2024
Changes: * [CHANGE] Replace logging library go-kit/log with slog prometheus#875 * [FEATURE] Support for prometheus scrape timeout in probe endpoint prometheus#828 * [ENHANCEMENT] Support MySQL 8.4 replicas syntax prometheus#837 * [ENHANCEMENT] Fetch lock time and cpu time from performance schema prometheus#862 * [ENHANCEMENT] Add the instance struct to handle connections prometheus#859 * [ENHANCEMENT] Optimize code by using built-in constants in the standard lib prometheus#844 * [BUGFIX] Fix fetching tmpTables vs tmpDiskTables from performance_schema prometheus#853 * [BUGFIX] Skip SPACE_TYPE column for MariaDB >=10.5 prometheus#860 * [BUGFIX] Fixed parsing of timestamps with non-zero padded days prometheus#841 * [BUGFIX] Fix auto_increment metric collection errors caused by using collation in INFORMATION_SCHEMA searches prometheus#833 * [BUGFIX] Fix race condition in ReloadConfig prometheus#760 * [BUGFIX] Change processlist query to support ONLY_FULL_GROUP_BY sql_mode prometheus#684 * [BUGFIX] replication_applier_status_by_worker requires mysql 8.0 prometheus#683 * [BUGFIX] Update docker registry link in README.md prometheus#813 * [BUGFIX] Fix Docker run command and update documentation for cnf file handling prometheus#843 * [BUGFIX] info_schema_tables: do not collect the sys schema prometheus#879 Signed-off-by: Cristian Greco <cristian@regolo.cc>
SuperQ
pushed a commit
that referenced
this pull request
Nov 8, 2024
Changes: * [CHANGE] Replace logging library go-kit/log with slog #875 * [FEATURE] Support for prometheus scrape timeout in probe endpoint #828 * [ENHANCEMENT] Support MySQL 8.4 replicas syntax #837 * [ENHANCEMENT] Fetch lock time and cpu time from performance schema #862 * [ENHANCEMENT] Add the instance struct to handle connections #859 * [ENHANCEMENT] Optimize code by using built-in constants in the standard lib #844 * [BUGFIX] Fix fetching tmpTables vs tmpDiskTables from performance_schema #853 * [BUGFIX] Skip SPACE_TYPE column for MariaDB >=10.5 #860 * [BUGFIX] Fixed parsing of timestamps with non-zero padded days #841 * [BUGFIX] Fix auto_increment metric collection errors caused by using collation in INFORMATION_SCHEMA searches #833 * [BUGFIX] Fix race condition in ReloadConfig #760 * [BUGFIX] Change processlist query to support ONLY_FULL_GROUP_BY sql_mode #684 * [BUGFIX] replication_applier_status_by_worker requires mysql 8.0 #683 * [BUGFIX] Update docker registry link in README.md #813 * [BUGFIX] Fix Docker run command and update documentation for cnf file handling #843 * [BUGFIX] info_schema_tables: do not collect the sys schema #879 Signed-off-by: Cristian Greco <cristian@regolo.cc>
SuperQ
added a commit
that referenced
this pull request
Nov 8, 2024
* [CHANGE] Replace logging library go-kit/log with slog #875 * [FEATURE] Support for prometheus scrape timeout in probe endpoint #828 * [ENHANCEMENT] Support MySQL 8.4 replicas syntax #837 * [ENHANCEMENT] Fetch lock time and cpu time from performance schema #862 * [ENHANCEMENT] Add the instance struct to handle connections #859 * [ENHANCEMENT] Optimize code by using built-in constants in the standard lib #844 * [BUGFIX] Fix fetching tmpTables vs tmpDiskTables from performance_schema #853 * [BUGFIX] Skip SPACE_TYPE column for MariaDB >=10.5 #860 * [BUGFIX] Fixed parsing of timestamps with non-zero padded days #841 * [BUGFIX] Fix auto_increment metric collection errors caused by using collation in INFORMATION_SCHEMA searches #833 * [BUGFIX] Fix race condition in ReloadConfig #760 * [BUGFIX] Change processlist query to support ONLY_FULL_GROUP_BY sql_mode #684 * [BUGFIX] replication_applier_status_by_worker requires mysql 8.0 #683 * [BUGFIX] Update docker registry link in README.md #813 * [BUGFIX] Fix Docker run command and update documentation for cnf file handling #843 * [BUGFIX] info_schema_tables: do not collect the sys schema #879 Signed-off-by: SuperQ <superq@gmail.com>
Merged
SuperQ
added a commit
that referenced
this pull request
Nov 8, 2024
* [CHANGE] Replace logging library go-kit/log with slog #875 * [FEATURE] Support for prometheus scrape timeout in probe endpoint #828 * [ENHANCEMENT] Support MySQL 8.4 replicas syntax #837 * [ENHANCEMENT] Fetch lock time and cpu time from performance schema #862 * [ENHANCEMENT] Add the instance struct to handle connections #859 * [ENHANCEMENT] Optimize code by using built-in constants in the standard lib #844 * [BUGFIX] Fix fetching tmpTables vs tmpDiskTables from performance_schema #853 * [BUGFIX] Skip SPACE_TYPE column for MariaDB >=10.5 #860 * [BUGFIX] Fixed parsing of timestamps with non-zero padded days #841 * [BUGFIX] Fix auto_increment metric collection errors caused by using collation in INFORMATION_SCHEMA searches #833 * [BUGFIX] Fix race condition in ReloadConfig #760 * [BUGFIX] Change processlist query to support ONLY_FULL_GROUP_BY sql_mode #684 * [BUGFIX] replication_applier_status_by_worker requires mysql 8.0 #683 * [BUGFIX] Update docker registry link in README.md #813 * [BUGFIX] Fix Docker run command and update documentation for cnf file handling #843 * [BUGFIX] info_schema_tables: do not collect the sys schema #879 Signed-off-by: SuperQ <superq@gmail.com>
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.
Hello, we have encountered the following issues in our actual production:
There are two tables in the database, test.x and test.X, which caused data collection failure.
Original error message:
The result set obtained from the original SQL query on the database is as follows:
MySQL instance parameters:
The data of the two tables with different cases, x and X, will appear twice separately. This caused the data collection to fail, and the relevant metrics for that node could not be collected. The table_schema and table_name need to be treated as case-sensitive unique keys for association.
References:
https://bugs.mysql.com/bug.php?id=34921
https://dev.mysql.com/doc/refman/5.7/en/charset-collation-information-schema.html