This is the thread management block, and executes in every NDB
kernel thread. This block is also used measure thread CPU usage
and to write this and other information into the
threadblocks
and
threadstat
tables in the
ndbinfo
information database.
The THRMAN
block is implemented as the
Thrman
class, in the file
storage/ndb/src/kernel/blocks/thrman.hpp
.
thrman.cpp
, found in the same directory,
defines a measure_cpu_usage()
method of this
class for measuring the CPU usage of a given thread. It also
defines a execDBINFO_SCANREQ()
method, which
writes this and other information about the thread such as its
thread ID and block number to the
threadblocks
and
threadstat
tables.