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

Do not create a redo log checkpoint at startup

    XMLWordPrintable

Details

    Description

      At startup, InnoDB is creating a redo log checkpoint.
      This is not only slowing down the InnoDB startup. It is also potentially hiding crash recovery bugs, because crash recovery is only processing the redo log records starting from the latest checkpoint.

      If the checkpoint is removed from InnoDB in 10.2, at least the following tests fail: encryption.innodb-redo-badkey encryption.innodb_encryption

      diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc
      index cdd569b9f4c..bb01c612a4a 100644
      --- a/storage/innobase/srv/srv0start.cc
      +++ b/storage/innobase/srv/srv0start.cc
      @@ -2722,13 +2722,6 @@ innobase_start_or_create_for_mysql(void)
       		fil_crypt_threads_init();
       		fil_system_exit();
       
      -		/*
      -		  Create a checkpoint before logging anything new, so that
      -		  the current encryption key in use is definitely logged
      -		  before any log blocks encrypted with that key.
      -		*/
      -		log_make_checkpoint_at(LSN_MAX, TRUE);
      -
       		/* Init data for datafile scrub threads */
       		btr_scrub_init();
       
      

      In 10.1, all encryption tests pass even after the code is removed, but this could also be because the tests are less extensive in 10.1 than in 10.2.

      The code was originally added in MDEV-8041, apparently to work around fundamental problems in redo log encryption key rotation, which was finally disabled in MDEV-9422. (MDEV-12041 was filed for re-enabling it.)

      Attachments

        Issue Links

          Activity

            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.