Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-3881

Maxscale killing connection to backend node when load data infile is run with transaction replay

    XMLWordPrintable

Details

    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 '"';
      

      Attachments

        Activity

          People

            markus makela markus makela
            ivenn Isaac Venn (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.