[MXS-3720] idle_session_pool_time should support prepared statements Created: 2021-08-12 Updated: 2021-08-17 Resolved: 2021-08-16 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | Core |
| Affects Version/s: | 6.1.1 |
| Fix Version/s: | 6.2.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Manjot Singh (Inactive) | Assignee: | markus makela |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
Maxscale should either support them or allow them to go through without pooling and not present an error. |
| Comments |
| Comment by Rob Schwyzer [ 2021-08-12 ] | |||||||||||||||||||||||||||
|
When we ran sysbench with this setting enabled, many queries got rejected by MaxScale with-
These errors do not occur when only persistpoolmax and persistmaxtime are configured- these occur only when idle_session_pool_time is configured and these errors occur at the exact time that kicks-in (in the test case, it was 10 seconds into sysbench run). Competing ProxySQL's Multiplexing feature also does not provide benefit for prepared statements, but it does identify prepared statements and avoids attempting to perform multiplexing on them. This means ProxySQL administrators can leave Multiplexing enabled and benefit from it when compatible queries are pushed through, and then incompatible queries (like prepared statements) are ignored and execute as expected. By comparison, for MaxScale, idle_session_pool_time needs to be disabled if any prepared statements are going to be submitted to MaxScale, even if these account for only a small fraction of the overall workload. | |||||||||||||||||||||||||||
| Comment by markus makela [ 2021-08-13 ] | |||||||||||||||||||||||||||
|
Can you add the sysbench command you ran? | |||||||||||||||||||||||||||
| Comment by markus makela [ 2021-08-13 ] | |||||||||||||||||||||||||||
|
Managed to reproduce MDEV-19811 with prepared statements and idle_session_pool_time. | |||||||||||||||||||||||||||
| Comment by markus makela [ 2021-08-13 ] | |||||||||||||||||||||||||||
|
Adding code that disables the pooling for that session if prepared statements are used should help avoid any problems. | |||||||||||||||||||||||||||
| Comment by markus makela [ 2021-08-13 ] | |||||||||||||||||||||||||||
|
Managed to also reproduce the exact same message by running sysbench. | |||||||||||||||||||||||||||
| Comment by Rob Schwyzer [ 2021-08-13 ] | |||||||||||||||||||||||||||
| |||||||||||||||||||||||||||
| Comment by markus makela [ 2021-08-16 ] | |||||||||||||||||||||||||||
|
If a connection uses prepared statements, the feature is disabled. Currently this doesn't re-activate the feature if the open PS count drops to zero but this can be considered an optimization. |