-
Notifications
You must be signed in to change notification settings - Fork 769
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
Add command line option to explicitly disable lock_wait_timeout (adds possibility to opt out of breaking changes with older versions) #896
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Francisco Esteveira <[email protected]>
Signed-off-by: Francisco Esteveira <[email protected]>
Signed-off-by: Francisco Esteveira <[email protected]>
I'm not generally a fan of "magic values" like this. I prefer more explicit settings. |
…_wait_timeout_fix
Signed-off-by: Francisco Esteveira <[email protected]>
Hello, thank you for your feedback! I have added a command line parameter to explicitly disable the option. What do you think? |
README.md
Outdated
@@ -145,6 +145,7 @@ mysqld.username | Username to be used for connecting | |||
config.my-cnf | Path to .my.cnf file to read MySQL credentials from. (default: `~/.my.cnf`) | |||
log.level | Logging verbosity (default: info) | |||
exporter.lock_wait_timeout | Set a lock_wait_timeout (in seconds) on the connection to avoid long metadata locking. (default: 2) | |||
exporter.disable_lock_wait_timeout | Disable the lock_wait_timeout connection parameter. Makes the exporter compatible with older versions of MySQL. (default: false) |
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.
I prefer "positive" flags, so that we don't have double negative behavior.
The disable would be --no-exporter.enable_lock_wait_timeout
.
exporter.disable_lock_wait_timeout | Disable the lock_wait_timeout connection parameter. Makes the exporter compatible with older versions of MySQL. (default: false) | |
exporter.enable_lock_wait_timeout | Disable the lock_wait_timeout connection parameter. Makes the exporter compatible with older versions of MySQL. (default: true) |
Yes, as a boolean flag is better. Thanks. |
Signed-off-by: Francisco Esteveira <[email protected]>
This PR adds a command line option to the exporter allowing the user to disable the lock_wait_timeout MySQL connection parameter making the exporter work again with older versions of mysql, while still behaving the same way by default.
Was really helpful for me, I need to monitor several instances in multi target mode and most of them are unsupported versions. Unless you see a problem with this I think it would be nice to have it merged.