Skip to content
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(inputs.mysql): Enforce float for all known floating-point information #15791

Merged
merged 3 commits into from
Sep 9, 2024

Conversation

srebhan
Copy link
Member

@srebhan srebhan commented Aug 29, 2024

Summary

Avoid type conflicts by pinning more Galera fields to float.

Checklist

  • No AI generated code was used in this PR

Related issues

resolves #15786

@telegraf-tiger telegraf-tiger bot added area/mysql fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels Aug 29, 2024
@srebhan srebhan self-assigned this Aug 29, 2024
@dmgeurts
Copy link

Installed on one node, will keep you posted

@dmgeurts
Copy link

Having removed the processors I now get the following error. MySQL reporting what should be float zero values as 0 (instead of 0.0) appears to cause trouble as these zero values end up wrongly interpreted as an integer.

Aug 29 17:41:30 sql.domain.com telegraf[3423853]: 2024-08-29T15:41:30Z E! [outputs.influxdb_v2] Failed to write metric to mysql (will be dropped: 422 Unprocessable Entity): unprocessable entity: failure writing points to database: partial write: field type conflict: input field "wsrep_apply_oool" on measurement "mysql" is type integer, already exists as type float dropped=1

SQL output of the and related values:

MariaDB [(none)]> SHOW STATUS LIKE 'wsrep_apply_%';
+--------------------+-------------+
| Variable_name      | Value       |
+--------------------+-------------+
| wsrep_apply_oooe   | 0.000437637 |
| wsrep_apply_oool   | 0           |
| wsrep_apply_window | 1.00044     |
| wsrep_apply_waits  | 0           |
+--------------------+-------------+
4 rows in set (0.001 sec)

If it helps, some example values can be found here: https://galeracluster.com/library/documentation/galera-status-variables.html

@srebhan
Copy link
Member Author

srebhan commented Aug 29, 2024

🤦 I think we need to bite the bullet and put all float values explicitly as float in there. Do you have a list of what should be a float? Otherwise I need to grep this out of the document you linked...

@srebhan srebhan force-pushed the mysql_issue_15786 branch from 81ab000 to 6579220 Compare August 30, 2024 07:15
@srebhan srebhan changed the title fix(inputs.mysql): Pin 'wsrep_local_recv_queue_avg' and 'wsrep_flow_control_paused' to float fix(inputs.mysql): Enforce float for all known floating-point information Aug 30, 2024
@telegraf-tiger
Copy link
Contributor

telegraf-tiger bot commented Sep 4, 2024

@srebhan srebhan added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Sep 9, 2024
@srebhan srebhan merged commit 2e056a8 into influxdata:master Sep 9, 2024
27 checks passed
@srebhan srebhan deleted the mysql_issue_15786 branch September 9, 2024 11:34
@github-actions github-actions bot added this to the v1.32.0 milestone Sep 9, 2024
asaharn pushed a commit to asaharn/telegraf that referenced this pull request Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/mysql fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong type for field [[inputs.mysql]]
3 participants