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

Test innodb.innodb-index-online occasionally fails

    XMLWordPrintable

Details

    Description

      The test innodb.innodb-index-online often fails like this on 10.6 or later branches. I suspect that it could be due to some changed timing characteristics related to MDEV-32050.

      11.0 5b6134b040b59d6c896ec0a2c86029a0bcca788c

      innodb.innodb-index-online '4k,clear,innodb' w19 [ fail ]
              Test ended at 2023-11-24 10:49:23
       
      CURRENT_TEST: innodb.innodb-index-online
      --- /mariadb/11/mysql-test/suite/innodb/r/innodb-index-online.result	2023-11-24 10:15:47.229132350 +0200
      +++ /mariadb/11/mysql-test/suite/innodb/r/innodb-index-online.reject	2023-11-24 10:49:23.174794627 +0200
      @@ -170,8 +170,8 @@
       ERROR 70100: Query execution was interrupted
       SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl';
       name	count
      -ddl_background_drop_indexes	0
      -ddl_online_create_index	0
      +ddl_background_drop_indexes	1
      +ddl_online_create_index	1
       ddl_pending_alter_table	0
       ddl_sort_file_alter_table	0
       ddl_log_file_alter_table	0
       
      mysqltest: Result content mismatch
      

      The test scenario is the KILL of the following statement:

      SET DEBUG_SYNC = 'row_log_apply_before SIGNAL c2d_created WAIT_FOR kill_done';
      CREATE INDEX c2d ON t1(c2);
      

      When this operation is rolled back, in row_merge_drop_indexes() we would normally have table->get_ref_count() == 1. In a failure case, a purge operation would intervene and open a table handle while row_merge_build_indexes() is blocked by the DEBUG_SYNC. This extra table handle would remain open across the rollback operation.

      The following patch (which depends on MDEV-32050, where we started to ignore innodb_purge_rseg_truncate_frequency) will make the test stable for me. The first hunk makes the test ./mtr --repeat proof, for easier testing.

      diff --git a/mysql-test/suite/innodb/t/innodb-index-online.test b/mysql-test/suite/innodb/t/innodb-index-online.test
      index 3a38afa84b7..059c9e01a0c 100644
      --- a/mysql-test/suite/innodb/t/innodb-index-online.test
      +++ b/mysql-test/suite/innodb/t/innodb-index-online.test
      @@ -4,6 +4,10 @@
       --source include/have_debug_sync.inc
       --source include/no_valgrind_without_big.inc
       
      +SET GLOBAL innodb_monitor_reset_all=all;
      +--disable_warnings
      +SET GLOBAL innodb_monitor_reset_all=default;
      +--enable_warnings
       let $innodb_metrics_select=
       SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl';
       
      @@ -154,6 +158,7 @@ let $ID= `SELECT @id := CONNECTION_ID()`;
       --error ER_QUERY_INTERRUPTED
       KILL QUERY @id;
       
      +SET GLOBAL innodb_max_purge_lag_wait=0;
       SET DEBUG_SYNC = 'row_log_apply_before SIGNAL c2d_created WAIT_FOR kill_done';
       --send
       CREATE INDEX c2d ON t1(c2);
      

      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.