[MXS-1361] ReadWriteSplit should always route COM_PING to all nodes Created: 2017-08-14  Updated: 2020-08-25  Resolved: 2017-09-01

Status: Closed
Project: MariaDB MaxScale
Component/s: readwritesplit
Affects Version/s: 2.1.5
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Geoff Montee (Inactive) Assignee: markus makela
Resolution: Won't Fix Votes: 0
Labels: None


 Description   

COM_PING is normally routed to all servers by ReadWriteSplit. e.g.:

2017-08-08 14:34:31 info : [readwritesplit] > Autocommit: [enabled], trx is [not open], cmd: (0x0e) MYSQL_COM_PING, type: QUERY_TYPE_SESSION_WRITE, stmt:
2017-08-08 14:34:31 info : [readwritesplit] Session write, routing to all servers.

But if a multi-statement query is executed in a session and if strict_multi_stmt=true, ReadWriteSplit will begin routing COM_PING only to the master:

2017-08-08 14:34:38 info : [readwritesplit] > Autocommit: [enabled], trx is [not open], cmd: (0x0e) MYSQL_COM_PING, type: QUERY_TYPE_SESSION_WRITE, stmt:
2017-08-08 14:34:38 info : [readwritesplit] Route query to master [1.1.1.1]:3306

This behavior could most likely lead to issues with client drivers and connection pools that use COM_PING to keep connections alive. There probably is not much reason to ever route COM_PING only to the master, so it might be best if COM_PING were always routed to all nodes.



 Comments   
Comment by markus makela [ 2017-08-15 ]

Technically it should not matter whether COM_PING are sent to the master or all servers as, in the cases where it would be sent to the master only, all queries would be routed only to the master. This will cause the slave connections to time out due to them not receiving any traffic but from a functional point of view, the client connection should never see this.

Comment by markus makela [ 2017-09-01 ]

Closing as Won't Fix as there's no benefit in routing COM_PING to all servers if the router session is locked to the master server only.

Generated at Thu Feb 08 04:06:10 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.