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

Atomic DDL: InnoDB: Cannot replay rename of tablespace, error Data structure corruption

    XMLWordPrintable

Details

    Description

      Two examples follow. I have a few more if needed.


      Case 1

      bb-10.6-monty-innodb 790a52644c

      2021-05-11 19:04:37 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=54303,54303
      2021-05-11 19:04:41 0 [Note] InnoDB: Starting final batch to recover 2264 pages from redo log.
      2021-05-11 19:04:44 0 [ERROR] InnoDB: Cannot replay rename of tablespace 81 from './test/tt6.ibd' to './test/table75_innodb_int_autoinc.ibd' because the target file exists
      2021-05-11 19:04:44 0 [ERROR] InnoDB: Plugin initialization aborted at srv0start.cc[1473] with error Data structure corruption
      

      In the case above, the test was running concurrent DDL in 4 threads and was sigkilled in the process. The last executed statements in each thread, according to the general log, were

      28 Query    DROP TABLE `table53_innodb_int_autoinc`, `table76_innodb_int_autoinc`, vv2
      30 Query    ALTER TABLE `table89_innodb_int_autoinc` DROP KEY `ncol4`, ADD KEY IF NOT EXISTS n ( `ncol4` ) COMMENT 'pad'
      31 Query    UNLOCK TABLES
      29 Query    RENAME TABLE `t15` TO tt6
      

      The logs, datadirs and rr profiles are available.


      Case 2

      bb-10.6-monty-innodb 790a52644c

      2021-05-11 17:59:28 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=54303,54303
      2021-05-11 17:59:29 0 [Note] InnoDB: Starting final batch to recover 456 pages from redo log.
      2021-05-11 17:59:30 0 [ERROR] InnoDB: Cannot replay rename of tablespace 13 from './test/tt11.ibd' to './test/t5_innodb.ibd' because the target file exists
      2021-05-11 17:59:30 0 [ERROR] InnoDB: Plugin initialization aborted at srv0start.cc[1473] with error Data structure corruption
      

      In the case above, the test was running various DDL in a single thread in PS protocol, got sigkilled upon running a query, and failed with the error above upon recovery.
      The logs and the data directories are available. Unfortunately, in PS protocol the last statement may be missing from the general log.
      rr profiles are also available, but the profile before crash seems to be broken somehow.
      So, this case is better than the previous one in the sense that there was only one thread involved, but worse in everything else.

      I think I've seen similar failures on previous releases without atomic DDL, so it's possibly not anything new, but I would expect it to be gone with atomic DDL. Strangely, I didn't see them in previous tests on atomic DDL, but now they have suddenly appeared in bulk.

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              elenst Elena Stepanova
              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.