Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-21103

Show thread pool wait status in SHOW PROCESSLIST

Details

    • Task
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • None
    • Server
    • None

    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 MDEV-21101).

      Features request:

      • add a query state like "Waiting"
      • let the time column show the actual "Time" the query so far spent waiting in the queue
      • show actual query in "Info"
      • optionally: show the queue position, to get an idea when the query might eventually get executed

      Attachments

        Issue Links

          Activity

            hholzgra Hartmut Holzgraefe created issue -
            hholzgra Hartmut Holzgraefe made changes -
            Field Original Value New Value

            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/

            wlad Vladislav Vaintroub added a comment - 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/

            "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.

            wlad Vladislav Vaintroub added a comment - "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.

            "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?

            hholzgra Hartmut Holzgraefe added a comment - "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?
            hholzgra Hartmut Holzgraefe added a comment - - edited

            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 MDEV-21101)

            hholzgra Hartmut Holzgraefe added a comment - - edited 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 MDEV-21101 )
            julien.fritsch Julien Fritsch made changes -
            Fixing Priority 250
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 101295 ] MariaDB v4 [ 131188 ]
            mariadb-jira-automation Jira Automation (IT) made changes -
            Zendesk Related Tickets 194203

            People

              Unassigned Unassigned
              hholzgra Hartmut Holzgraefe
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.