Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-4222

Import from Table fails or writing empty values

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 1.0.0, 1.5.2
    • 5.5.1
    • ExeMgr
    • None
    • CentOS 7

    Description

      Hello.

      With our latest upgrade from CS 1.2 to Server 1.5 a typical select and insert between 2 tables is not working anymore.

      – Test with derived sub: ERROR without limit in derived

      insert into test_target_innodb (  C_, A_, B_, D_, E_)  select   C_,   A_,   B_,   D_  ,  E_  
      FROM (select 'text' as C_,   A_,   B_,   D_  ,  E_   FROM test_base_columnstore    -- limit 5000
       )derived;
      

      ERROR: 
      CAL0055: ERROR: ExeMgr has caught an exception. InetStreamSocket::readToMagic(): I/O error2.1: err = -1 e = 104: Connection reset by peer
      

      Additional:
      After repeating the insert a couple of times, the insert works wrong with empty or NULL Values and will not force any Warning or ERROR, just writing garbage int the target table:

          select * from test_target_innodb order by rand();
          # row_id, C_, A_, B_, D_, E_
         '28904', '', NULL, NULL, NULL, NULL
         '12174', '', NULL, NULL, NULL, NULL
          '7356', '', NULL, NULL, NULL, NULL
      

      With smaller result set ,e.g. with limit, it works). It works also when both tables are innodb tables. Hover, the full table insert is just 50K rows and a couple of columns is finally not really outstanding.

      So far Errors coming up with default parameters from Upgrade. We've tried a lot of Parameter variations, like read_buffer_size, max_allowed_packet, etc., unfortunately with no success.

      Alternative proceeding w/o derived table works fine with all tested larger result sets:

      -- Test : works fine
      insert into test_target_innodb (  C_, A_, B_, D_, E_)  select 'text' as C_,   A_,   B_,   D_  ,  E_  
      FROM test_base_columnstore;
      

      If source and target tables are both columnstore, we've got the same result. The log entries:

      Jul 30 19:14:05 127 cpimport.bin[20874]: 05.085591 |0|0|0| I 34 CAL0086: Initiating BulkLoad: -e 0 -s #007 -E #021 -R /tmp/columnstore_tmp_files/BrmRpt063019140520842.rpt -m 1 -P pm1-20842 -T SYSTEM -u7a2f86ab-8251-4753-9860-b0da6541a4df uii5 test_target_innodb
      Jul 30 19:14:05 127 cpimport.bin[20874]: 05.165076 |0|0|0| I 34 CAL0081: Start BulkLoad: JobId-5359; db-uii5
      Jul 30 19:14:07 127 ExeMgr[15996]: 07.310363 |7|0|0| D 16 CAL0042: End SQL statement
      Jul 30 19:14:07 127 ExeMgr[15996]: 07.310529 |7|0|0| C 16 CAL0055: ERROR: ExeMgr has caught an exception. InetStreamSocket::readToMagic(): I/O error2.1: err = -1 e = 104: Connection reset by peer
      Jul 30 19:14:07 127 writeenginesplit[20842]: 07.310631 |0|0|0| I 33 CAL0000: Send EOD message to All PMs
      Jul 30 19:14:07 127 writeengineserver[15990]: 07.315008 |0|0|0| D 32 CAL0000: 5671 : onReceiveEOD : child ID = 20874
      Jul 30 19:14:07 127 writeengineserver[15990]: 07.315128 |0|0|0| D 32 CAL0000: 5671 : Message Queue is empty; Stopping CF Thread
      Jul 30 19:14:07 127 cpimport.bin[20874]: 07.430849 |0|0|0| I 34 CAL0083: BulkLoad: JobId-5359; finished loading table uii5.test_target_innodb; 0 rows inserted
      Jul 30 19:14:07 127 cpimport.bin[20874]: 07.436008 |0|0|0| I 34 CAL0082: End BulkLoad: JobId-5359; status-SUCCESS
      Jul 30 19:14:07 127 writeengineserver[15990]: 07.451677 |0|0|0| I 32 CAL0000: 5671 : cpimport exit on success
      

      This Test indicates that we don't have a problem with structure of the data or memory in general. Therefore it seems to be a bug with result streaming from columnstore or Parameter we didn't found.

      Your help would be really appreciated.

      Thanks a lot in advance.

      -----------------------
      Proceeding to reproduce the data for upon:

       CREATE TABLE `test_base_columnstore_stage` ( 
        `C_` varchar(100) DEFAULT NULL,
        `A_` varchar(100) DEFAULT NULL,
        `B_` varchar(100) DEFAULT NULL,
        `D_` varchar(100) DEFAULT NULL,
        `E_` varchar(100) DEFAULT NULL  
      ) ENGINE=innodb DEFAULT CHARSET=utf8 ;
       
       CREATE TABLE `test_base_columnstore` ( 
        `C_` varchar(100) DEFAULT NULL,
        `A_` varchar(100) DEFAULT NULL,
        `B_` varchar(100) DEFAULT NULL,
        `D_` varchar(100) DEFAULT NULL,
        `E_` varchar(100) DEFAULT NULL  
      ) ENGINE=columnstore DEFAULT CHARSET=utf8 ;
       
       
      DELIMITER $$
      CREATE PROCEDURE generate_demo()
      BEGIN
        DECLARE i INT DEFAULT 0;
        WHILE i < 50000 DO
          INSERT INTO `test_base_columnstore_stage` (C_,A_,B_,D_,E_) VALUES (
            ROUND((RAND() * 100000),0), ROUND((RAND() * 100000),0), ROUND((RAND() * 100000),0), ROUND((RAND() * 100000),0),  
            1
          );
          SET i = i + 1;
        END WHILE;
        insert into test_base_columnstore select * from test_base_columnstore_stage;
      END$$
      DELIMITER ;
       
      CALL generate_demo();
      

      Attachments

        Issue Links

          Activity

            People

              dleeyh Daniel Lee (Inactive)
              Christian2 Christian2
              Votes:
              2 Vote for this issue
              Watchers:
              8 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.