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

MariaDB slow start after crash recovery

Details

    Description

      If InnoDB crash recovery was needed, the InnoDB function srv_start() would invoke extra validation:

      			bool validate = recv_needed_recovery
      				&& srv_force_recovery == 0;
       
      			dict_check_tablespaces_and_store_max_id(validate);
      

      This time-consuming validation (reading something from every InnoDB data file) should be unnecessary now that RENAME operations inside InnoDB are crash-safe (MDEV-14717).

      The validation can be skipped by setting innodb_force_recovery=1, but that setting will also cause InnoDB crash recovery to turn a blind eye on some problems, such as data files missing, and redo log for missing files being skipped.

      We should skip the extra validation in MariaDB 10.3 onwards. In MariaDB 10.2 we can skip it unless the compatibility setting innodb_safe_truncate=OFF is active.

      Attachments

        Issue Links

          Activity

            marko Marko Mäkelä created issue -
            marko Marko Mäkelä made changes -
            Field Original Value New Value
            marko Marko Mäkelä made changes -

            In MariaDB 10.2, we will not read files after crash recovery by default (innodb_safe_truncate=ON). We will also skip opening files whose name starts with #sql- in this case.

            In MariaDB 10.3 and later versions, there is no innodb_safe_truncate=OFF option; renames inside InnoDB will be transactional and #sql- tables will be dropped automatically on startup.

            marko Marko Mäkelä added a comment - In MariaDB 10.2, we will not read files after crash recovery by default ( innodb_safe_truncate=ON ). We will also skip opening files whose name starts with #sql- in this case. In MariaDB 10.3 and later versions, there is no innodb_safe_truncate=OFF option; renames inside InnoDB will be transactional and #sql- tables will be dropped automatically on startup.
            marko Marko Mäkelä made changes -
            issue.field.resolutiondate 2019-04-03 18:28:01.0 2019-04-03 18:28:01.179
            marko Marko Mäkelä made changes -
            Fix Version/s 10.2.24 [ 23308 ]
            Fix Version/s 10.3.15 [ 23309 ]
            Fix Version/s 10.4.4 [ 23310 ]
            Fix Version/s 10.2 [ 14601 ]
            Fix Version/s 10.3 [ 22126 ]
            Fix Version/s 10.4 [ 22408 ]
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Closed [ 6 ]
            marko Marko Mäkelä made changes -
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 92844 ] MariaDB v4 [ 155801 ]

            People

              marko Marko Mäkelä
              marko Marko Mäkelä
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.