Tungsten Connector is an essential part of Tungsten Clustering for MySQL, MariaDB, and Percona Server. In this blog post, we talk about the Automatic Reconnect feature in the Tungsten Connector.
Automatic reconnect enables the Connector to re-establish a connection in the event of a transient failure. Under specific circumstances, the Connector will also retry the query.
Connector automatic reconnect is enabled by default in Proxy and Smartscale modes.
Use the following tpm command option on the command line (remove the leading hyphens inside INI files):
--connector-autoreconnect=false
to disable automatic reconnect.
This feature is not available while running in Bridge Mode. Use the tpm command option --connector-bridge-mode=false
to disable Bridge mode.
Automatic reconnect enables retries of statements under the following circumstances:
- not in bridge mode
- not inside a transaction
- no temp table has been created
- no lock acquired and not released
- the request is a read
To disable:
shell> tpm update alpha --connector-autoreconnect=false
The autoreconnect status can be monitored within the autoReconnect parameter output by the tungsten show variables while connected to the Connector. For example:
shell> tpm connector
mysql> tungsten show variables like "autoReconnect";
+----------------------+---------------+-------+
| Variable_Type | Variable_name | Value |
+----------------------+---------------+-------+
| connector.properties | autoReconnect | false |
+----------------------+---------------+-------+
1 row in set (0.00 sec)
The above output indicates that the autoreconnect feature is disabled. The tungsten show command is not available in Bridge mode.
Click here for the documentation page: Connector Automatic Reconnect
In future articles, we will continue to cover more advanced subjects of interest!
Questions? Contact Continuent
Comments
Add new comment