Bug #116951 mysqlrouter Error parsing stats_updates_frequency errors
Submitted: 11 Dec 2024 16:12 Modified: 6 Jan 20:12
Reporter: Keith Hollman Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Router Severity:S4 (Feature request)
Version:8.4.3 OS:Any (4.18.0-553.22.1.el8_10.x86_64)
Assigned to: CPU Architecture:Any
Tags: router, stats_updates_frequency

[11 Dec 2024 16:12] Keith Hollman
Description:
Router gives the following errors, in their thousands:
2024-12-05 14:56:57 metadata_cache WARNING [7f7f903a7700] Error parsing stats_updates_frequency from the router_options: options.stats_updates_frequency='null'; not an unsigned int. Using default value
2024-12-05 14:57:02 metadata_cache WARNING [7f7f903a7700] Error parsing stats_updates_frequency from the router_options: options.stats_updates_frequency='null'; not an unsigned int. Using default value
2024-12-05 14:57:07 metadata_cache WARNING [7f7f903a7700] Error parsing stats_updates_frequency from the router_options: options.stats_updates_frequency='null'; not an unsigned int. Using default value
2024-12-05 14:57:13 metadata_cache WARNING [7f7f903a7700] Error parsing stats_updates_frequency from the router_options: options.stats_updates_frequency='null'; not an unsigned int. Using default value
2024-12-05 14:57:18 metadata_cache WARNING [7f7f903a7700] Error parsing stats_updates_frequency from the router_options: options.stats_updates_frequency='null'; not an unsigned int. Using default value
2024-12-05 14:57:23 metadata_cache WARNING [7f7f903a7700] Error parsing stats_updates_frequency from the router_options: options.stats_updates_frequency='null'; not an unsigned int. Using default value
2024-12-05 14:57:28 metadata_cache WARNING [7f7f903a7700] Error parsing stats_updates_frequency from the router_options: options.stats_updates_frequency='null'; not an unsigned int. Using default value
2024-12-05 14:57:33 metadata_cache WARNING [7f7f903a7700] Error parsing stats_updates_frequency from the router_options: options.stats_updates_frequency='null'; not an unsigned int. Using default value
2024-12-05 14:57:38 metadata_cache WARNING [7f7f903a7700] Error parsing stats_updates_frequency from the router_options: options.stats_updates_frequency='null'; not an unsigned int. Using default value
2024-12-05 14:57:43 metadata_cache WARNING [7f7f903a7700] Error parsing stats_updates_frequency from the router_options: options.stats_updates_frequency='null'; not an unsigned int. Using default value
2024-12-05 14:57:48 metadata_cache WARNING [7f7f903a7700] Error parsing stats_updates_frequency from the router_options: options.stats_updates_frequency='null'; not an unsigned int. Using default value
2024-12-05 14:57:53 metadata_cache WARNING [7f7f903a7700] Error parsing stats_updates_frequency from the router_options: options.stats_updates_frequency='null'; not an unsigned int. Using default value
2024-12-05 14:57:58 metadata_cache WARNING [7f7f903a7700] Error parsing stats_updates_frequency from the router_options: options.stats_updates_frequency='null'; not an unsigned int. Using default value
2024-12-05 14:58:03 metadata_cache WARNING [7f7f903a7700] Error parsing stats_updates_frequency from the router_options: options.stats_updates_frequency='null'; not an unsigned int. Using default value

This means I have to specify, explicitly:

cs.setRoutingOption('webserver01::router_VLC01', 'stats_updates_frequency', 1)
cs.setRoutingOption('webserver02::router_VLC02', 'stats_updates_frequency', 1)

and restart router.

this should be specified by default, instead of generating thousands of "Error parsing stats_updates_frequency" errors.

Make sure this option is passed through when bootstrap happens in 8.4.3

How to repeat:
Bootstrap a router and start it up.

Suggested fix:
Have 'stats_updates_frequency', 1 by default instead of "null".
[12 Dec 2024 15:40] MySQL Verification Team
Thanks for the report. I verified it as feature request.
[13 Dec 2024 9:12] Andrzej Religa
Posted by developer:
 
Commit msg for the patch

When the value set for stats_updates_frequency in the metadata is not
expected type (unsigned int), the Router keeps logging a waring each
metadata refresh. This patch changes this behaviour, the warning only
gets logged once, unless the value set has changed.
[6 Jan 20:12] Philip Olson
Posted by developer:
 
Fixed as of the upcoming MySQL Router 9.2.0 release, and here's the proposed changelog entry from the documentation team:

When stats_updates_frequency was set to an unexpected value, MySQL Router
would log a warning during each metadata refresh thus clogging the logs.
Now the warning is logged just once, unless the value changed.

Thank you for the bug report.