Details
-
New Feature
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
-
MXS-CAPACITY-Q4-2026
Description
Problem
When a client session disconnects from MaxScale while a query was running, the sessio is torn down and the backends are closed. For normal MariaDB protocol connections, they are closed by sending a COM_QUIT packet and closing the TCP socket. For queries that are very heavy or do a long operation, this leaves them up and running.
Solution
Implement an option that kills the query when it gets killed. A slightly smarter approach would be to delay the killing of the query slightly so that only the ones that exceed some configurable threshold are killed. This would allow batching of the KILL checks which should reduce the overhead.
Original description:
maxctrl destory session does kill exa query
The expectation is that destroy session will kill the associated exasol queries
Reproduce:
docker exec -it exasoldb exaplus -c 127.0.0.1/nocertcheck:8563 -u sys -p exasol -s mariadb_exa_demo |
|
|
--/
|
CREATE OR REPLACE PYTHON3 SCALAR SCRIPT UTIL.sleep_seconds(secs DOUBLE)
|
RETURNS INT AS
|
|
|
def run(ctx):
|
import time |
time.sleep(ctx.secs)
|
return 1 |
/
|
;
|
|
|
docker exec -it mariadb mariadb --skip-ssl -h maxscale -P 3311 -paBc123%% -u admin_user |
SELECT SESSION_ID, USER_NAME, STATUS, SQL_TEXT FROM EXA_DBA_SESSIONS;
|
SELECT UTIL.sleep_seconds(100) FROM DUAL; |
|
|
# different window
|
docker exec -it maxscale bash
|
maxctrl list sessions
|
maxctrl destroy session $ID
|
|
|
docker exec -it mariadb mariadb --skip-ssl -h maxscale -P 3311 -paBc123%% -u admin_user |
SELECT SESSION_ID, USER_NAME, STATUS, SQL_TEXT FROM EXA_DBA_SESSIONS;
|
|
|
# notice exasol query wasnt killed
|