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

InnoDB multi-batch recovery stops prematurely

    XMLWordPrintable

Details

    Description

      In the final testing of MDEV-31791, I observed the following failure:

      11.2 e81fa345020ec6a067583db6a7019d6404b26f93 with patches

      innodb.recovery_memory 'innodb,release'  w4 [ 89 fail ]  Found warnings/errors in server log file!
              Test ended at 2023-08-02 12:21:21
      line
      2023-08-02 12:21:18 0 [ERROR] InnoDB: We scanned the log up to 418951162. A checkpoint was at 418061736 and the maximum LSN on a database page was 421016108. It is possible that the database is now corrupt!
      2023-08-02 12:21:18 0 [ERROR] InnoDB: Page [page id: space=1, page number=88] log sequence number 421016108 is in the future! Current system log sequence number 418966369.
      2023-08-02 12:21:18 0 [ERROR] InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to https://mariadb.com/kb/en/library/innodb-recovery-modes/ for information about forcing recovery.
      2023-08-02 12:21:18 0 [ERROR] InnoDB: Page [page id: space=1, page number=0] log sequence number 421016108 is in the future! Current system log sequence number 418966369.
      2023-08-02 12:21:18 0 [ERROR] InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to https://mariadb.com/kb/en/library/innodb-recovery-modes/ for information about forcing recovery.
      

      A larger excerpt of the server error log indicates that we actually scanned more of the log, but for some reason failed to fully apply the final recovery batch and stopped prematurely at LSN 418951162 instead of 421869561:

      2023-08-02 12:21:18 0 [Note] InnoDB: Multi-batch recovery needed at LSN 418950921
      2023-08-02 12:21:18 0 [Note] InnoDB: End of log at LSN=421869561
      2023-08-02 12:21:18 0 [Note] InnoDB: To recover: LSN 418950921/421869561; 106 pages
      2023-08-02 12:21:18 0 [ERROR] InnoDB: We scanned the log up to 418951162. A checkpoint was at 418061736 and the maximum LSN on a database page was 421016108. It is possible that the database is now corrupt!
      2023-08-02 12:21:18 0 [Note] InnoDB: 1 transaction(s) which must be rolled back or cleaned up in total 15548 row operations to undo
      2023-08-02 12:21:18 0 [Note] InnoDB: Trx id counter is 652795
      2023-08-02 12:21:18 0 [Note] InnoDB: Opened 3 undo tablespaces
      2023-08-02 12:21:18 0 [Note] InnoDB: 128 rollback segments in 3 undo tablespaces are active.
      2023-08-02 12:21:18 0 [Note] InnoDB: Starting in background the rollback of recovered transactions
      2023-08-02 12:21:18 0 [ERROR] InnoDB: Page [page id: space=1, page number=88] log sequence number 421016108 is in the future! Current system log sequence number 418966369.
      ...
      2023-08-02 12:21:19 0 [Note] InnoDB: log sequence number 418951162; transaction id 652796
      

      This might be a regression due to MDEV-29911.

      Attachments

        Issue Links

          Activity

            People

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