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

Wrong progress report for operations on InnoDB tables

Details

    • 10.0.23

    Description

      Initially reported on the mailing list: https://lists.launchpad.net/maria-discuss/msg02495.html .

      Stage: 1 of 72 'altering table' 350% of stage done. 

      Reproducible as described.

      Dataset: salaries table in the employees sample database.

      Statements that exhibit the incorrect behaviour:

      ALTER TABLE salaries ENGINE = Innodb;
      ALTER TABLE salaries ADD id INT NULL;
      ALTER TABLE salaries DROP id;
      ALTER TABLE salaries ROW_FORMAT = COMPRESSED;

      I also saw the mentioned 350% and some other values, e.g.

      MariaDB [employees]> ALTER TABLE salaries ADD id INT NULL;
      Stage: 1 of 85 'altering table'    200% of stage done

      MyISAM looks reasonable (2 stages, below 100% progress).

      Not reproducible on 5.5.
      10.0 has a different problem – progress for InnoDB tables is not reported at all.

      Attachments

        Issue Links

          Activity

            10.1: storage/[xtradb|innobase]/row/row0merge.cc function row_merge_sort line 254 there is thd_progress_init(trx->mysql_thd, num_runs); maybe should make sure that num_runs is correct here. This could be naturally be some other bug...

            jplindst Jan Lindström (Inactive) added a comment - 10.1: storage/ [xtradb|innobase] /row/row0merge.cc function row_merge_sort line 254 there is thd_progress_init(trx->mysql_thd, num_runs); maybe should make sure that num_runs is correct here. This could be naturally be some other bug...
            svoj Sergey Vojtovich added a comment - - edited

            jplindst, please review fix for this bug. Even though it fixes described problem, I'd say InnoDB progress report is still misleading: e.g. for given queries row merge takes just ~20 seconds of ~10 minutes, so that one can watch "Stage: 1 of 1 'altering table' 98.7% of stage done" for about 9 remaining minutes.

            svoj Sergey Vojtovich added a comment - - edited jplindst , please review fix for this bug. Even though it fixes described problem, I'd say InnoDB progress report is still misleading: e.g. for given queries row merge takes just ~20 seconds of ~10 minutes, so that one can watch "Stage: 1 of 1 'altering table' 98.7% of stage done" for about 9 remaining minutes.

            What InnoDB or something else is doing those remaining 9 minutes ?

            jplindst Jan Lindström (Inactive) added a comment - What InnoDB or something else is doing those remaining 9 minutes ?

            I didn't analyze it.

            svoj Sergey Vojtovich added a comment - I didn't analyze it.

            Ok to push.

            jplindst Jan Lindström (Inactive) added a comment - Ok to push.

            People

              svoj Sergey Vojtovich
              elenst Elena Stepanova
              Votes:
              2 Vote for this issue
              Watchers:
              10 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.