[MXS-3881] Maxscale killing connection to backend node when load data infile is run with transaction replay Created: 2021-11-16  Updated: 2022-02-04  Resolved: 2021-11-19

Status: Closed
Project: MariaDB MaxScale
Component/s: readwritesplit
Affects Version/s: 6.1.4
Fix Version/s: 6.2.0

Type: Bug Priority: Major
Reporter: Isaac Venn (Inactive) Assignee: markus makela
Resolution: Fixed Votes: 0
Labels: triage


 Description   

Tested in skysql.
Issue is related to transaction replay and load data infile (it seems).

What happens is, with transaction replay enabled (and also causal reads, but we aren't sure if that's related), when a load data infile operation is run, somewhere in the execution the connection is killed to the backend node and the load fails.

Here is an example of what is seen from the command line interface:

MariaDB [whiteboxtest]> load data local infile '/tmp/mass-update-adutwcpjv.csv' replace into table `temptest` fields terminated by ',' optionally enclosed by '"';
ERROR 1927 (08S01): Connection killed by MaxScale

And this is what is seen in the maxscale log:

2021-11-16 16:00:35   error  : (990463) [readwritesplit] (Read-Write-Service); Server 'whitebox-mdb-ms-2' was lost in the middle of a resultset, cannot continue the session: #HY000: Lost connection to backend server: network error (whitebox-mdb-ms-2: 104, Connection reset by peer)

To reproduce:

Spin up a new HA cluster.
Enable transaction replay on maxscale
Create a table similar to this one:

CREATE TABLE `temptest` (
  `id` bigint(20) DEFAULT NULL,
  `shipstation_order_id` bigint(20) DEFAULT NULL,
  `shipstation_link_id` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tracking_number` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `carrier` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `shipped_from` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `shipped_from_building_id` int(11) DEFAULT NULL,
  `status` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `shipping_cost` double DEFAULT NULL,
  `ship_date` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci 

Load data from attached file as csv like so:

load data local infile '/tmp/mass-update-adutwcpjv.csv' replace into table `temptest` fields terminated by ',' optionally enclosed by '"';



 Comments   
Comment by markus makela [ 2021-11-17 ]

Does the problem consistently go away if you disable both transaction_replay and causal reads?

Comment by Isaac Venn (Inactive) [ 2021-11-17 ]

Just disabling transaction replay solves the issue.

Comment by Isaac Venn (Inactive) [ 2021-11-18 ]

Removed.

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