Bug #111769 Option to specify timeout when running mysqlshell util - checkForServerUpgrade
Submitted: 17 Jul 2023 1:02 Modified: 11 Mar 12:13
Reporter: Chelluru Vidyadhar Email Updates:
Status: Closed Impact on me:
None 
Category:Shell Upgrade Checker Severity:S4 (Feature request)
Version:8.0 OS:Any
Assigned to: CPU Architecture:Any

[17 Jul 2023 1:02] Chelluru Vidyadhar
Description:
There are many checks implemented in checkForServerUpgrade utility of mysqlshell to validate the upgrade compatibility with 8.0.x version.

Depending on number of tables or objects present in the database, sometimes these queries can take very long time and may cause issues to the actual production operations. 

Its helpful to implement a timeout mechanism which will be applicable to all queries executed by checkForServerUpgrade utility. In case if any of the queries fails with an error (due to timeout), the users can consider to rerun by increasing the timeout in non-production hours.

How to repeat:
Create a server with 2 million tables and execute checkForServerUpgrade utility. Most of the queries executed by checkForServerUpgrade utility will take considerably long amount of time. 

Suggested fix:
Consider to implement a option for the checkForServerUpgrade utility like --Query-timeout which will kill queries running for longer than mentioned time. 

In here, we need to consider to kill the queries explicitly rather than depending on max_execution_time as it will not kill queries in any processlist state. (ref: https://bugs.mysql.com/bug.php?id=102181)
[17 Jul 2023 5:24] MySQL Verification Team
Hello Chelluru,

Thank you for the feature request!

regards,
Umesh
[11 Mar 12:13] Edward Gilmore
Posted by developer:
 
Added the following note to the MySQL Shell 9.3.0 release notes:
  
A timeout option is added to the Upgrade Checker utility, checkTimeout: n. 
The timeout value (seconds) applies to each check performed by the utility. 
If the timeout is reached while a check is being performed, the check is 
cancelled, the utility starts the next check and resets the timeout.