MDEV-15333 MariaDB (still) slow start
This performance regression was introduced in the MariaDB 10.1 file format incompatibility bug fix MDEV-11623 (MariaDB 10.1.21 and MariaDB 10.2.4) and partially fixed in MariaDB 10.1.25 in MDEV-12610 without adding a regression test case. On a normal startup (without crash recovery), InnoDB should not read every .ibd data file, because this is slow. Like in MySQL, for now, InnoDB will still open every data file (without reading), and it will read every .ibd file for which an .isl file exists, or the DATA DIRECTORY attribute has been specified for the table. The test case shuts down InnoDB, moves data files, replaces them with garbage, and then restarts InnoDB, expecting no messages to be issued for the garbage files. (Some messages will for now be issued for the table that uses the DATA DIRECTORY attribute.) Finally, the test shuts down the server, restores the old data files, and restarts again to drop the tables. fil_open_single_table_tablespace(): Remove the condition on flags, and only call fsp_flags_try_adjust() if validate==true (reading the first page has been requested). The only caller with validate==false is at server startup when we are processing all records from SYS_TABLES. The flags passed to this function are actually derived from SYS_TABLES.TYPE and SYS_TABLES.N_COLS, and there never was any problem with SYS_TABLES in MariaDB 10.1. The problem that MDEV-11623 was that incorrect tablespace flags were computed and written to FSP_SPACE_FLAGS.
Showing
Please register or sign in to comment