Commit afc9d00
committed
MDEV-23991 dict_table_stats_lock() has unnecessarily long scope
Patch removes dict_index_t::stats_latch. Table/index statistics now protected with dict_sys->mutex. That way statistics computation can happen in parallel in several threads and dict_sys->mutex will be locked only for a short period of time. This patch is a joint work with Marko Mäkelä dict_index_t::lock: make mutable which allows to pass const pointer when only lock is touched in an object btr_height_get() btr_get_size(): make index argument const for better type safety btr_estimate_number_of_different_key_vals(): now returns computed values instead of setting fields in dict_index_t directly remove everything related to dict_index_t::stats_latch dict_stats_index_set_n_diff(): now returns computed values instead of setting fields in dict_index_t directly dict_stats_analyze_index(): now returns computed values instead of setting fields in dict_index_t directly Reviewed by: Marko Mäkelä1 parent 42e1815 commit afc9d00
File tree
21 files changed
+289
-280
lines changed- mysql-test/suite/innodb
- r
- t
- storage/innobase
- btr
- dict
- handler
- ibuf
- include
- row
- sync
21 files changed
+289
-280
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
286 | | - | |
| 286 | + | |
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
| |||
592 | 592 | | |
593 | 593 | | |
594 | 594 | | |
595 | | - | |
| 595 | + | |
596 | 596 | | |
597 | 597 | | |
598 | 598 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6133 | 6133 | | |
6134 | 6134 | | |
6135 | 6135 | | |
6136 | | - | |
6137 | | - | |
| 6136 | + | |
6138 | 6137 | | |
6139 | 6138 | | |
6140 | 6139 | | |
6141 | | - | |
| 6140 | + | |
6142 | 6141 | | |
6143 | 6142 | | |
6144 | | - | |
6145 | | - | |
6146 | | - | |
6147 | | - | |
6148 | | - | |
6149 | | - | |
6150 | | - | |
| 6143 | + | |
| 6144 | + | |
| 6145 | + | |
| 6146 | + | |
| 6147 | + | |
| 6148 | + | |
6151 | 6149 | | |
6152 | 6150 | | |
6153 | 6151 | | |
| |||
6167 | 6165 | | |
6168 | 6166 | | |
6169 | 6167 | | |
| 6168 | + | |
| 6169 | + | |
6170 | 6170 | | |
6171 | 6171 | | |
6172 | | - | |
6173 | | - | |
6174 | | - | |
| 6172 | + | |
6175 | 6173 | | |
6176 | 6174 | | |
6177 | 6175 | | |
| |||
6280 | 6278 | | |
6281 | 6279 | | |
6282 | 6280 | | |
6283 | | - | |
| 6281 | + | |
6284 | 6282 | | |
6285 | 6283 | | |
6286 | 6284 | | |
| |||
6386 | 6384 | | |
6387 | 6385 | | |
6388 | 6386 | | |
| 6387 | + | |
| 6388 | + | |
6389 | 6389 | | |
6390 | | - | |
| 6390 | + | |
| 6391 | + | |
| 6392 | + | |
6391 | 6393 | | |
6392 | 6394 | | |
6393 | 6395 | | |
| |||
6408 | 6410 | | |
6409 | 6411 | | |
6410 | 6412 | | |
6411 | | - | |
| 6413 | + | |
6412 | 6414 | | |
6413 | | - | |
| 6415 | + | |
6414 | 6416 | | |
6415 | | - | |
6416 | | - | |
6417 | | - | |
6418 | | - | |
6419 | 6417 | | |
6420 | | - | |
| 6418 | + | |
6421 | 6419 | | |
6422 | 6420 | | |
6423 | 6421 | | |
6424 | 6422 | | |
| 6423 | + | |
| 6424 | + | |
6425 | 6425 | | |
6426 | 6426 | | |
6427 | 6427 | | |
6428 | 6428 | | |
6429 | | - | |
| 6429 | + | |
6430 | 6430 | | |
6431 | 6431 | | |
6432 | 6432 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | 270 | | |
321 | 271 | | |
322 | 272 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
129 | | - | |
| 128 | + | |
130 | 129 | | |
131 | 130 | | |
132 | 131 | | |
| |||
182 | 181 | | |
183 | 182 | | |
184 | 183 | | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | 184 | | |
192 | 185 | | |
193 | 186 | | |
| |||
237 | 230 | | |
238 | 231 | | |
239 | 232 | | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | 233 | | |
245 | 234 | | |
246 | 235 | | |
| |||
0 commit comments