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

Possible race condition between statistics and bulk insert

Details

    Description

      This issue was found during the testing of MDEV-24621, by an intermittent failure of the test innodb.insert_into_empty. The failure occurred during the ROLLBACK of an INSERT into a table that was empty.

      I was not able to repeat a failure on 10.6, but I think that a similar race condition is present. When we are computing statistics for an index tree, we failed to check whether an insert into an empty table is in progress by an active transaction. If yes, we should do what MVCC reads do: pretend that the table is empty.

      No crash or other problem is known in the current 10.6 or in 10.7, but I think that it is better to treat this situation in a safe and consistent manner.

      Attachments

        Issue Links

          Activity

            marko Marko Mäkelä created issue -
            marko Marko Mäkelä made changes -
            Field Original Value New Value
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            Labels race regression-10.6 performance race regression-10.6
            Priority Blocker [ 1 ] Critical [ 2 ]
            marko Marko Mäkelä made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            marko Marko Mäkelä made changes -
            issue.field.resolutiondate 2021-09-17 12:11:24.0 2021-09-17 12:11:24.502
            marko Marko Mäkelä made changes -
            Fix Version/s 10.6.5 [ 26034 ]
            Fix Version/s 10.7.0 [ 26072 ]
            Fix Version/s 10.6 [ 24028 ]
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 125096 ] MariaDB v4 [ 159693 ]

            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.