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

Stop ANALYZE TABLE from flushing table definition cache

Details

    Description

      It is well known that in concurrent environment running ANALYZE TABLE could lead to situation when hundreds of threads are in state "Waiting for table flush".

      Percona had resolved this problem recently so that ANALYZE TABLE stops flushing affected tables from the table definition cache, see https://bugs.launchpad.net/percona-server/+bug/1704195 , https://github.com/percona/percona-server/pull/1977 etc for more details.

      This is a request to implement the same/similar approach in MariaDB, maybe even 10.1+, but at least 10.3+.

      Attachments

        Issue Links

          Activity

            The patch in percona server is fairly small and should be applicable to MariaDB:
            https://github.com/percona/percona-server/pull/1977/commits/cd7201514fee78aaf7d3eb2b28d2573c76f53b84

            I don't quite understand these things yet:

            • if ANALYZE TABLE doesn't cause TABLE objects to be flushed, what will? Or,
              objects with old statistics values will remain in use indefinitely? (Or,
              InnoDB and TokuDB have a property that updated table statistics will start to
              be used anyway, and so flushing the table is redundant?
            • Interplay of this with ANALYZE TABLE commands that collect EITS stats.
            psergei Sergei Petrunia added a comment - The patch in percona server is fairly small and should be applicable to MariaDB: https://github.com/percona/percona-server/pull/1977/commits/cd7201514fee78aaf7d3eb2b28d2573c76f53b84 I don't quite understand these things yet: if ANALYZE TABLE doesn't cause TABLE objects to be flushed, what will? Or, objects with old statistics values will remain in use indefinitely? (Or, InnoDB and TokuDB have a property that updated table statistics will start to be used anyway, and so flushing the table is redundant? Interplay of this with ANALYZE TABLE commands that collect EITS stats.

            The patch applies cleanly, testing it in bb-10.3-mdev15101 branch. Will still need to sort out the above questions.

            psergei Sergei Petrunia added a comment - The patch applies cleanly, testing it in bb-10.3-mdev15101 branch. Will still need to sort out the above questions.

            For the first question, those SEs have that property that updated table statistics will start to be used anyway. (Consider e.g. how InnoDB background stats operate which keep stats up to date without flushing anything)

            laurynas Laurynas Biveinis added a comment - For the first question, those SEs have that property that updated table statistics will start to be used anyway. (Consider e.g. how InnoDB background stats operate which keep stats up to date without flushing anything)
            svoj Sergey Vojtovich added a comment - - edited

            FWIW in MDEV-17882 I came across this issue from another angle. It is now blocking further progress of forementioned MDEV and there're chances that I'll get it fixed to be able to progress further.

            svoj Sergey Vojtovich added a comment - - edited FWIW in MDEV-17882 I came across this issue from another angle. It is now blocking further progress of forementioned MDEV and there're chances that I'll get it fixed to be able to progress further.

            People

              psergei Sergei Petrunia
              valerii Valerii Kravchuk
              Votes:
              7 Vote for this issue
              Watchers:
              21 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.