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

Missing connection id value in I_S.thread_pool_queues

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.5.10, 10.5.11, 10.5.12
    • 10.5.13, 10.6.5
    • Server
    • None

    Description

      As far as I can tell, column I_S.thread_pool_queues.connection_id is supposed to contain ids of connections that are waiting for available worker threads.
      The issue is that I haven't observed any values in this column besides NULL.
      That makes it not quite possible to discern connections that are really sleeping from those that have queued queries.

      Can be reproduced using official docker image.

      MARIADB_VERSION=10.5.12 ./test-in-contaner.sh ./thread-pool-queues.sh > ./result.txt
      

      Result:

      cat result.txt 
      +----------+----------+----------+---------------+----------------------------+
      | GROUP_ID | POSITION | PRIORITY | CONNECTION_ID | QUEUEING_TIME_MICROSECONDS |
      +----------+----------+----------+---------------+----------------------------+
      |        0 |        0 |        0 |          NULL |                      18301 |
      |        0 |        1 |        0 |          NULL |                      16621 |
      |        0 |        2 |        0 |          NULL |                      16214 |
      |        0 |        3 |        0 |          NULL |                      15903 |
      |        0 |        4 |        0 |          NULL |                      14968 |
      |        0 |        5 |        0 |          NULL |                      14366 |
      |        0 |        6 |        0 |          NULL |                      12835 |
      |        0 |        7 |        0 |          NULL |                      11526 |
      +----------+----------+----------+---------------+----------------------------+
      +----------+----------+----------+---------------+----------------------------+
      | GROUP_ID | POSITION | PRIORITY | CONNECTION_ID | QUEUEING_TIME_MICROSECONDS |
      +----------+----------+----------+---------------+----------------------------+
      |        0 |        0 |        1 |          NULL |                      56000 |
      |        0 |        1 |        1 |          NULL |                      56000 |
      |        0 |        2 |        1 |          NULL |                      56000 |
      |        0 |        3 |        1 |          NULL |                      56000 |
      |        0 |        4 |        1 |          NULL |                      56000 |
      |        0 |        5 |        1 |          NULL |                      56000 |
      +----------+----------+----------+---------------+----------------------------+
      +----------+----------+----------+---------------+----------------------------+
      | GROUP_ID | POSITION | PRIORITY | CONNECTION_ID | QUEUEING_TIME_MICROSECONDS |
      +----------+----------+----------+---------------+----------------------------+
      |        0 |        0 |        1 |          NULL |                    1068634 |
      |        0 |        1 |        1 |          NULL |                    1068634 |
      |        0 |        2 |        1 |          NULL |                    1068634 |
      |        0 |        3 |        1 |          NULL |                    1068634 |
      +----------+----------+----------+---------------+----------------------------+
      +----------+----------+----------+---------------+----------------------------+
      | GROUP_ID | POSITION | PRIORITY | CONNECTION_ID | QUEUEING_TIME_MICROSECONDS |
      +----------+----------+----------+---------------+----------------------------+
      |        0 |        0 |        0 |          NULL |                    2081406 |
      |        0 |        1 |        0 |          NULL |                    2081406 |
      |        0 |        2 |        0 |          NULL |                    2081406 |
      |        0 |        3 |        1 |          NULL |                     584074 |
      |        0 |        4 |        1 |          NULL |                     584074 |
      |        0 |        5 |        1 |          NULL |                     584074 |
      |        0 |        6 |        1 |          NULL |                     466012 |
      +----------+----------+----------+---------------+----------------------------+
      +----------+----------+----------+---------------+----------------------------+
      | GROUP_ID | POSITION | PRIORITY | CONNECTION_ID | QUEUEING_TIME_MICROSECONDS |
      +----------+----------+----------+---------------+----------------------------+
      |        0 |        0 |        0 |          NULL |                    3093475 |
      |        0 |        1 |        0 |          NULL |                    1596143 |
      |        0 |        2 |        0 |          NULL |                    1596143 |
      |        0 |        3 |        0 |          NULL |                    1596143 |
      |        0 |        4 |        0 |          NULL |                    1478081 |
      |        0 |        5 |        1 |          NULL |                     920131 |
      |        0 |        6 |        1 |          NULL |                     460330 |
      +----------+----------+----------+---------------+----------------------------+
      +----------+----------+----------+---------------+----------------------------+
      | GROUP_ID | POSITION | PRIORITY | CONNECTION_ID | QUEUEING_TIME_MICROSECONDS |
      +----------+----------+----------+---------------+----------------------------+
      |        0 |        0 |        0 |          NULL |                    2608249 |
      |        0 |        1 |        0 |          NULL |                    2608249 |
      |        0 |        2 |        0 |          NULL |                    2490187 |
      |        0 |        3 |        0 |          NULL |                    1932237 |
      |        0 |        4 |        0 |          NULL |                    1472436 |
      |        0 |        5 |        1 |          NULL |                     836087 |
      |        0 |        6 |        1 |          NULL |                     345225 |
      +----------+----------+----------+---------------+----------------------------+
      

      Attachments

        Issue Links

          Activity

            People

              wlad Vladislav Vaintroub
              narkq Alex Sladkov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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