[MDEV-15101] Stop ANALYZE TABLE from flushing table definition cache Created: 2018-01-28 Updated: 2022-10-04 Resolved: 2020-06-12 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Alter Table |
| Fix Version/s: | 10.5.4 |
| Type: | Task | Priority: | Critical |
| Reporter: | Valerii Kravchuk | Assignee: | Sergei Petrunia |
| Resolution: | Fixed | Votes: | 7 |
| Labels: | percona, upstream | ||
| Issue Links: |
|
||||||||
| 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+. |
| Comments |
| Comment by Sergei Petrunia [ 2019-01-11 ] |
|
The patch in percona server is fairly small and should be applicable to MariaDB: I don't quite understand these things yet:
|
| Comment by Sergei Petrunia [ 2019-01-11 ] |
|
The patch applies cleanly, testing it in bb-10.3-mdev15101 branch. Will still need to sort out the above questions. |
| Comment by Laurynas Biveinis [ 2019-01-12 ] |
|
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) |
| Comment by Sergey Vojtovich [ 2020-03-31 ] |
|
FWIW in |