[MDEV-29367] Refactor tpool::cache Created: 2022-08-24  Updated: 2023-11-22  Resolved: 2022-08-24

Status: Closed
Project: MariaDB Server
Component/s: OTHER
Affects Version/s: 10.5, 10.6, 10.7, 10.8
Fix Version/s: 10.5.18, 10.6.10, 10.7.6, 10.8.5, 10.9.3, 10.10.2

Type: Bug Priority: Major
Reporter: Vladislav Vaintroub Assignee: Vladislav Vaintroub
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Problem/Incident
causes MDEV-32861 InnoDB hangs when running out of I/O ... Closed

 Description   

While analysing MDEV-29190, marko voiced concerns over tpool::cache thread safety, mainly over the use of std::vector methods push_back(), pop_back(), and size()

It was not apparent by reading the code that the cache does not grow, and the vector is not getting reallocated (this does not happen, because push_back() should only be applied to prevously pop_back()ed element)

Also, there was a complaint that it is hard to impossible to debug the elements that were "borrowed" from cache, and there is not much comments for the class.


Generated at Thu Feb 08 10:08:00 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.