MXS-1367: Add timeouts for retried queries
The total timeout for the retrying of interrupted queries can now be configured with the `query_retry_timeout` parameter. It controls the total timeout in seconds that the query can take. The actual connection, read and write timeouts of the connector aren't a good configuration value to use for abstracted queries as the time that it takes to execute a query can be composed of both connections, reads and writes. This is caused by the usage of MYSQL_OPT_RECONNECT that hides the fact that the connector reconnects to the server when a query is attempted.
This commit is contained in:
@ -21,6 +21,7 @@
|
||||
#include <limits.h>
|
||||
#include <openssl/sha.h>
|
||||
#include <sys/utsname.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <maxscale/modinfo.h>
|
||||
|
||||
@ -75,6 +76,7 @@ typedef struct
|
||||
char qc_name[PATH_MAX]; /**< The name of the query classifier to load */
|
||||
char* qc_args; /**< Arguments for the query classifier */
|
||||
int query_retries; /**< Number of times a interrupted query is retried */
|
||||
time_t query_retry_timeout; /**< Timeout for query retries */
|
||||
} MXS_CONFIG;
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user