[MDEV-21103] Show thread pool wait status in SHOW PROCESSLIST Created: 2019-11-20 Updated: 2020-01-23 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Server |
| Fix Version/s: | None |
| Type: | Task | Priority: | Minor |
| Reporter: | Hartmut Holzgraefe | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
Currently a connection that has issued a query, but which is still in the pool-of-threads wait queue waiting to be executed, just shows with status "Sleep" and no query text, just as if the client was idle and had not sent any query at all, and the time info does not even reflect the time at which the waiting query was sent to the server, but the time the previous query ended (which also leads to Features request:
|
| Comments |
| Comment by Vladislav Vaintroub [ 2019-11-20 ] |
|
Can't you join the I_S.PROCESSLIST and I_S.THREADPOOL_QUEUES on ID column to get the information ?https://mariadb.com/kb/en/library/information-schema-threadpool_queues-table/ |
| Comment by Vladislav Vaintroub [ 2019-11-20 ] |
|
"show actual query" is not possible, threadpool does not pre-read anything from the client socket. it only gets notified that client has sent something. |
| Comment by Hartmut Holzgraefe [ 2019-11-21 ] |
|
"Can't you join the I_S.PROCESSLIST and I_S.THREADPOOL_QUEUES on ID column to get the information" Well, I simply expect that when the process list tells me that a client is sleeping/idle, that it actually is. Or that there would at least be a hint that there may be additional information elsewhere that needs to be taken into account. Right now I'd continue to claim that PROCESSLIST is simply returning wrong, misleading information. "threadpool does not pre-read anything from the client socket. it only gets notified that client has sent something." Ok, but at least it does know that the client has sent something. So at least some different state than "Sleep" could be shown? PS: does that mean that even a simple mysql_ping() would not get an immediate response? |
| Comment by Hartmut Holzgraefe [ 2019-11-21 ] |
|
Yes, mysql_ping() will have to wait, too, although from a quick test it looks as if it is at least prioritized over other "real" queries when an execution thread becomes available ... But this also means that even the recommendation to issue a ping packet every once in a while to avoid running into wait_timeout would not work with pool-of-threads then ...? (which is actually more a topic for the related |