Documentation Home

23.6.15.62 ndbinfo 线程表

threads表提供有关在NDB内核中运行的线程的信息。

threads表包含以下列:

  • node_id

    运行线程的节点ID

  • thr_no

    线程 ID(特定于此节点)

  • thread_name

    线程名称(线程类型)

  • thread_description

    线程(类型)说明

笔记

来自 2 节点示例集群的示例输出(包括线程描述)如下所示:

mysql> SELECT * FROM threads;
+---------+--------+-------------+------------------------------------------------------------------+
| node_id | thr_no | thread_name | thread_description                                               |
+---------+--------+-------------+------------------------------------------------------------------+
|       5 |      0 | main        | main thread, schema and distribution handling                    |
|       5 |      1 | rep         | rep thread, asynch replication and proxy block handling          |
|       5 |      2 | ldm         | ldm thread, handling a set of data partitions                    |
|       5 |      3 | recv        | receive thread, performing receive and polling for new receives  |
|       6 |      0 | main        | main thread, schema and distribution handling                    |
|       6 |      1 | rep         | rep thread, asynch replication and proxy block handling          |
|       6 |      2 | ldm         | ldm thread, handling a set of data partitions                    |
|       6 |      3 | recv        | receive thread, performing receive and polling for new receives  |
+---------+--------+-------------+------------------------------------------------------------------+
8 rows in set (0.01 sec)

NDB 8.0.23 引入了将 ThreadConfig参数 mainor中的一个设置rep为 0 同时将另一个参数保持为 1 的可能性,在这种情况下,线程名称为 main_rep,其描述为main and rep thread, schema, distribution, proxy block and asynch replication handling。从 NDB 8.0.23 开始,也可以将main和 都设置rep为 0,在这种情况下,生成的线程的名称在此表中显示为 main_rep_recv,其描述为 main, rep and recv thread, schema, distribution, proxy block and asynch replication handling and handling receive and polling for new receives