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

Upgrade from previous versions to 10.2 with innodb-read-only does not work

Details

    Description

      Note: It might well be intended, but it's worth checking. Also, maybe it could benefit from a better error message.

      Version: '10.1.23-MariaDB-debug'  socket: '/data/bld/10.1/data/tmp/mysql.sock'  port: 3306  Source distribution
      2017-03-27  2:18:25 140478047542016 [Note] /data/bld/10.1/bin/mysqld: Normal shutdown
       
      2017-03-27  2:18:25 140478047542016 [Note] Event Scheduler: Purging the queue. 0 events
      2017-03-27  2:18:26 140477273724672 [Note] InnoDB: FTS optimize thread exiting.
      2017-03-27  2:18:26 140478047542016 [Note] InnoDB: Starting shutdown...
      2017-03-27  2:18:26 140478047542016 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool
      2017-03-27  2:18:28 140478047542016 [Note] InnoDB: Shutdown completed; log sequence number 1622848
      2017-03-27  2:18:28 140478047542016 [Note] /data/bld/10.1/bin/mysqld: Shutdown complete
       
      2017-03-27  2:18:43 139835740817280 [Note] InnoDB: Started in read only mode
      2017-03-27  2:18:43 139835740817280 [Note] InnoDB: !!!!!!!! UNIV_DEBUG switched on !!!!!!!!!
      2017-03-27  2:18:43 139835740817280 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
      2017-03-27  2:18:43 139835740817280 [Note] InnoDB: Uses event mutexes
      2017-03-27  2:18:43 139835740817280 [Note] InnoDB: Compressed tables use zlib 1.2.8
      2017-03-27  2:18:43 139835740817280 [Note] InnoDB: Using Linux native AIO
      2017-03-27  2:18:43 139835740817280 [Note] InnoDB: Number of pools: 1
      2017-03-27  2:18:43 139835740817280 [Note] InnoDB: Using SSE2 crc32 instructions
      2017-03-27  2:18:43 139835740817280 [Note] InnoDB: Disabling background log and ibuf IO write threads.
      2017-03-27  2:18:43 139835740817280 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
      2017-03-27  2:18:43 139835740817280 [Note] InnoDB: Completed initialization of buffer pool
      2017-03-27  2:18:43 139835740817280 [Note] InnoDB: Highest supported file format is Barracuda.
      2017-03-27  2:18:43 139835740817280 [Note] InnoDB: Creating shared tablespace for temporary tables
      2017-03-27  2:18:43 139835740817280 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
      2017-03-27  2:18:44 139835740817280 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
      2017-03-27  2:18:44 139835740817280 [ERROR] InnoDB: Cannot create system tables in read-only mode
      2017-03-27  2:18:44 139835740817280 [ERROR] InnoDB: Plugin initialization aborted at srv0start.cc[2577] with error Read only transaction
      2017-03-27  2:18:44 139835740817280 [Note] InnoDB: Starting shutdown...
      2017-03-27  2:18:44 139835740817280 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
      2017-03-27  2:18:44 139835740817280 [ERROR] Plugin 'InnoDB' init function returned error.
      2017-03-27  2:18:44 139835740817280 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
      2017-03-27  2:18:44 139835740817280 [Note] Plugin 'FEEDBACK' is disabled.
      2017-03-27  2:18:44 139835740817280 [ERROR] Unknown/unsupported storage engine: InnoDB
      2017-03-27  2:18:44 139835740817280 [ERROR] Aborting
      

      Attachments

        Issue Links

          Activity

            marko Marko Mäkelä added a comment - - edited

            This is intentional, and also so in upstream. In addition to this, until MDEV-12700 is fixed, we would also refuse an innodb_read_only startup if the change buffer is not empty.
            If you have specific suggestions how to improve the handling, I am happy to implement it.

            marko Marko Mäkelä added a comment - - edited This is intentional, and also so in upstream. In addition to this, until MDEV-12700 is fixed, we would also refuse an innodb_read_only startup if the change buffer is not empty. If you have specific suggestions how to improve the handling, I am happy to implement it.

            From the log it looks like InnoDB attempts to do something, and only then realizes that it can't due to the read-only mode. When it happens this way, there is always a danger that it does something towards upgrade before aborting, thus leaving the datadir in a half-upgraded state. I would much prefer if it checked the read-only mode from the very beginning, and refused to do anything at all with a proper error message. (I don't know how it really works internally, maybe that's what is already happening, and the log just FUD-ish).

            elenst Elena Stepanova added a comment - From the log it looks like InnoDB attempts to do something, and only then realizes that it can't due to the read-only mode. When it happens this way, there is always a danger that it does something towards upgrade before aborting, thus leaving the datadir in a half-upgraded state. I would much prefer if it checked the read-only mode from the very beginning, and refused to do anything at all with a proper error message. (I don't know how it really works internally, maybe that's what is already happening, and the log just FUD-ish).

            The only ‘permanent damage’ that the upgrade does is the creation of the temporary tablespace file(s) (by default, the file ibtmp1).
            The other messages in the error log are about the initialization of main-memory based data structures and subsystems.

            I agree that we should postpone the creation of the temporary tablespace until the very last moment, right before accepting user connections.

            marko Marko Mäkelä added a comment - The only ‘permanent damage’ that the upgrade does is the creation of the temporary tablespace file(s) (by default, the file ibtmp1). The other messages in the error log are about the initialization of main-memory based data structures and subsystems. I agree that we should postpone the creation of the temporary tablespace until the very last moment, right before accepting user connections.

            It looks like starting with MDEV-12548, we no longer create the temporary tablespace in innodb_read_only mode.

            The upgrade would be aborted, because the table SYS_VIRTUAL would have to be created.

            marko Marko Mäkelä added a comment - It looks like starting with MDEV-12548 , we no longer create the temporary tablespace in innodb_read_only mode. The upgrade would be aborted, because the table SYS_VIRTUAL would have to be created.

            People

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