Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
11.8, 12.3
-
None
-
Can result in unexpected behaviour
-
After multithreaded mariadb-import ends it error, it may fail to clean some remaining LOAD DATA jobs.
Description
When a worker fails in mariadb-import --use-threads=N, safe_exit() calls kill_tp_connections() to kill the other workers' connections, so the server does not keep loading after the client exits.
It sends mysql_kill() for every connection over the failing worker's own connection, in list order. The failing worker's connection is in that list, so it can kill itself first. The following mysql_kill() calls then go over a dead connection and fail (the result is not checked), and the other workers are not killed. The client then calls _exit(), and the server is left running their LOAD DATA for a client that is gone.
Seen intermittently in main.mysqldump (mariadb-import --use-threads=2 with a dropped table): the server logs "Aborted connection ... (Client disconnected)" for a worker that was still running LOAD DATA.
Fix: kill the other connections first (skip own), then mysql_close() the own connection.
Attachments
Issue Links
- relates to
-
MDEV-39641 Semi-Sync Replica can KILL a reässigned connection
-
- Open
-