Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-7114

Online DDL does not behave like expected

    Details

      Description

      We are using regular replication no GTID on master -> slaves setup

      Running on the master

       
      ALTER ONLINE TABLE pages  ROW_FORMAT=COMPRESSED    KEY_BLOCK_SIZE=4, ALGORITHM=INPLACE 
      

      We observe :

      • Replication is delayed for 25 minutes, time of the DDL
      • MySQL client does not return and is waiting for all the duration of the alter
      • On one slave replication SQL THREAD stopped on the alter table statement
      • On this slave the table is corrupted

      optimize table pages;

       
      +----------------+----------+----------+-------------------------------------------------------------------+
      | Table          | Op       | Msg_type | Msg_text                                                          |
      +----------------+----------+----------+-------------------------------------------------------------------+
      | ccmstats.pages | optimize | note     | Table does not support optimize, doing recreate + analyze instead |
      | ccmstats.pages | optimize | error    | Incorrect key file for table 'pages'; try to repair it            |
      | ccmstats.pages | optimize | status   | Operation failed                                                  |
      +----------------+----------+----------+-------------------------------------------------------------------+
      3 rows in set, 1 warning (35.65 sec)
       
      
      CREATE TABLE `pages` (
        `idUrl` int(10) unsigned NOT NULL,
        `section` tinyint(4) NOT NULL,
        `titre` varchar(100) NOT NULL,
        `description` varchar(255) NOT NULL,
        `idDomaine` tinyint(3) unsigned NOT NULL,
        `solved` tinyint(1) DEFAULT '0',
        PRIMARY KEY (`idDomaine`,`idUrl`),
        KEY `unicity` (`idDomaine`,`section`)
      ) ENGINE=InnoDB DEFAULT CHARSET=latin1
      
      show table status like 'pages'\G
      *************************** 1. row ***************************
                 Name: pages
               Engine: InnoDB
              Version: 10
           Row_format: Compressed
                 Rows: 7025762
       Avg_row_length: 144
          Data_length: 1015545856
      Max_data_length: 0
         Index_length: 39563264
            Data_free: 3145728
       Auto_increment: NULL
          Create_time: 2014-11-14 14:40:55
          Update_time: NULL
           Check_time: NULL
            Collation: latin1_swedish_ci
             Checksum: NULL
       Create_options: row_format=COMPRESSED key_block_size=4
              Comment:
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              stephane@skysql.com VAROQUI Stephane added a comment -

              Upstream related issue Bug #18734396, Bug #72594

              Show
              stephane@skysql.com VAROQUI Stephane added a comment - Upstream related issue Bug #18734396, Bug #72594
              Hide
              elenst Elena Stepanova added a comment -

              Since the fix is in InnoDB 5.6.21, it should appear in 10.0.15 along with the InnoDB/XtraDB merge.

              Show
              elenst Elena Stepanova added a comment - Since the fix is in InnoDB 5.6.21, it should appear in 10.0.15 along with the InnoDB/XtraDB merge.
              Hide
              stephane@skysql.com VAROQUI Stephane added a comment -

              I guess that upstream fixe the corruption , but it those not say anythings about alter online is not replication friendly so not really ONLINE at the end. Should alter online table be fast and free the connection and move the alter in a background THD or is that expected to wait on the client until it's finished ?

              On my experience ALTER ONLINE on toku is a background task.

              That's not what i observe in xtradb with the above DDL. Using GTID design, by changing domain id we possibly can fixe the replication delay, moving the online task to an other replication THD. Is that needed or Online should not blocked by definition ?

              Show
              stephane@skysql.com VAROQUI Stephane added a comment - I guess that upstream fixe the corruption , but it those not say anythings about alter online is not replication friendly so not really ONLINE at the end. Should alter online table be fast and free the connection and move the alter in a background THD or is that expected to wait on the client until it's finished ? On my experience ALTER ONLINE on toku is a background task. That's not what i observe in xtradb with the above DDL. Using GTID design, by changing domain id we possibly can fixe the replication delay, moving the online task to an other replication THD. Is that needed or Online should not blocked by definition ?
              Hide
              serg Sergei Golubchik added a comment -

              InnoDB/XtraDB 5.6.21 is merged

              Show
              serg Sergei Golubchik added a comment - InnoDB/XtraDB 5.6.21 is merged

                People

                • Assignee:
                  serg Sergei Golubchik
                  Reporter:
                  stephane@skysql.com VAROQUI Stephane
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: