mirror of
https://github.com/MariaDB/server.git
synced 2025-11-06 22:06:13 +01:00
Removed redundant FLUSH STATUS, doesn't serve any purpose in this test. Shrinking thread_cache_size is done without appropriate mutex protection and it doesn't flush thread cache. It means we may have more threads in the cache than thread_cache_size allows. First FLUSH THREADS (line 36) was added just in case thread_cache_size_func-master.opt file is removed and raising thread_cache_size from 0 to 3 becomes shrinking from the default value to 3. Second FLUSH THREADS (line 81) was added to fix timeout in wait condition (line 100). It serves as a barrier that guarantees fourth preceding disconnect won't pick one of subsequent connects and in turn leave 2 threads in the cache. Threads_cached cannot be queried for exact value because there can (or cannot) be disconnecting threads from previous tests or mtr utility connection. There is also a gap between server_threads.erase() (aka removal from I_S.PROCESSLIST) and thread_cache.park() (aka Threads_cached++). All in all it makes Threads_cached value unpredictable after thread_cache_size is set to 3. Instead of querying for exact value, just make sure Threads_cached doesn't exceed thread_cache_size. |
||
|---|---|---|
| .. | ||
| inc | ||
| r | ||
| t | ||
| disabled.def | ||