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

CLUST INDEX WITH ONLINE FLAG SHOULD BE USED BY INNODB INTERNAL SQL PARSER IN CASE OF TABLE REBUILD.

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 11.6(EOL)
    • None
    • None
    • LINUX

    Description

      We've see a server crash due to long semaphore wait. The innodb stats update thread updates stats(dict_stats_save_index_stat()) on a table using InnoDB internal parser, holding dict_operation_lock and dict_sys->mutext, but the plan is full table scan(innodb_index_stats) other than clust index scan. There are more than 200 thousands records in stats table, and there are multiple udpates for the table stats. So it takes more than 900s to finish.

      The reason why stats updates use full table scan is that there is a running SQL: ALTER TABLE mysql.innodb_index_stats ENGINE=InnoDB STATS_PERSISTENT=0. The online DDL set cluster index of innodb_index_stats to ONLINE_INDEX_CREATION.
      callstack:
      prepare_inplace_alter_table_dict
      --row_log_allocate
      ----dict_index_set_online_status

      In function opt_calc_index_goodness():
      343 /* At least for now we don't support using FTS indexes for queries
      344 done through InnoDB's own SQL parser. */
      345 if (dict_index_is_online_ddl(index) || (index->type & DICT_FTS))

      { 346 return(0); 347 }

      In this case we should use the online index.

      Attachments

        Activity

          People

            Unassigned Unassigned
            tiandiwonder Shaohua Wang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.