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

InnoDB redo log minimum size check uses detected file size instead of requested innodb_log_file_size

Details

    Description

      $ ./mtr --mysqld=--innodb-page-size=32k --mysqld=--innodb-buffer-pool-size=24m full_backup
      ...
      mysqltest: At line 15: exec of '10.1/build/extra/mariabackup/mariabackup  --prepare --target-dir=10.1/build/mysql-test/var/tmp/backup 2>&1' failed, error: 34304, status: 134, errno: 0
      ...
      InnoDB: The combined size of ib_logfiles should be bigger than
      InnoDB: 200 kB * innodb_thread_concurrency.
      2017-06-02 07:52:04 7f80148fabc0  InnoDB: Assertion failure in thread 140188077501376 in file ha_innodb.cc line 21953
      

      Attachments

        Issue Links

          Activity

            not sure if it MDEV-12975 is part of MDEV-12966 or separate problem

            anikitin Andrii Nikitin (Inactive) added a comment - not sure if it MDEV-12975 is part of MDEV-12966 or separate problem

            The problem appears to be that the srv_log_file_size is measured from the xtrabackup_logfile, not from the actual requested configuration. Later during the startup, the redo log file would be resized, but the capacity check is wrongly based on the initially measured file size.

            marko Marko Mäkelä added a comment - The problem appears to be that the srv_log_file_size is measured from the xtrabackup_logfile, not from the actual requested configuration. Later during the startup, the redo log file would be resized, but the capacity check is wrongly based on the initially measured file size.

            I can repeat this in 10.0:

            diff --git a/mysql-test/suite/innodb/t/log_file_size.test b/mysql-test/suite/innodb/t/log_file_size.test
            index 4bae93957e8..741a704f1fe 100644
            --- a/mysql-test/suite/innodb/t/log_file_size.test
            +++ b/mysql-test/suite/innodb/t/log_file_size.test
            @@ -37,6 +37,12 @@ call mtr.add_suppression("Attempting backtrace");
             FLUSH TABLES;
             --enable_query_log
             
            +--let $restart_parameters= --innodb-thread-concurrency=1 --innodb-log-file-size=1m --innodb-log-files-in-group=2
            +--source include/restart_mysqld.inc
            +
            +--let $restart_parameters= --innodb-thread-concurrency=300 --innodb-log-file-size=10M --innodb-log-files-in-group=2
            +--source include/restart_mysqld.inc
            +
             CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB;
             BEGIN;
             INSERT INTO t1 VALUES (42);
            

            CURRENT_TEST: innodb.log_file_size
             
             
            Server [mysqld.1 - pid: 18181, winpid: 18181, exit: 256] failed during test run
            Server log from this test:
            InnoDB: Error: ib_logfiles are too small for innodb_thread_concurrency 300.
            InnoDB: The combined size of ib_logfiles should be bigger than
            InnoDB: 200 kB * innodb_thread_concurrency.
            

            This bug should be present in MySQL as well. I did not think of this case when implementing InnoDB redo log resizing in MySQL 5.6.8.

            marko Marko Mäkelä added a comment - I can repeat this in 10.0: diff --git a/mysql-test/suite/innodb/t/log_file_size.test b/mysql-test/suite/innodb/t/log_file_size.test index 4bae93957e8..741a704f1fe 100644 --- a/mysql-test/suite/innodb/t/log_file_size.test +++ b/mysql-test/suite/innodb/t/log_file_size.test @@ -37,6 +37,12 @@ call mtr.add_suppression("Attempting backtrace"); FLUSH TABLES; --enable_query_log +--let $restart_parameters= --innodb-thread-concurrency=1 --innodb-log-file-size=1m --innodb-log-files-in-group=2 +--source include/restart_mysqld.inc + +--let $restart_parameters= --innodb-thread-concurrency=300 --innodb-log-file-size=10M --innodb-log-files-in-group=2 +--source include/restart_mysqld.inc + CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB; BEGIN; INSERT INTO t1 VALUES (42); CURRENT_TEST: innodb.log_file_size     Server [mysqld.1 - pid: 18181, winpid: 18181, exit: 256] failed during test run Server log from this test: … InnoDB: Error: ib_logfiles are too small for innodb_thread_concurrency 300. InnoDB: The combined size of ib_logfiles should be bigger than InnoDB: 200 kB * innodb_thread_concurrency. This bug should be present in MySQL as well. I did not think of this case when implementing InnoDB redo log resizing in MySQL 5.6.8.

            Note: the formula stated in the error message is inaccurate. Also note that the calculation depends on innodb_page_size, so with innodb_page_size=64k the minimum innodb_log_file_size is roughly 4 times the minimum size required for innodb_page_size=16k for the same innodb_thread_concurrency.

            marko Marko Mäkelä added a comment - Note: the formula stated in the error message is inaccurate. Also note that the calculation depends on innodb_page_size, so with innodb_page_size=64k the minimum innodb_log_file_size is roughly 4 times the minimum size required for innodb_page_size=16k for the same innodb_thread_concurrency.

            People

              marko Marko Mäkelä
              anikitin Andrii Nikitin (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.