NDB Cluster Internals  / NDB Kernel Blocks  /  The QMGR Block

4.17 The QMGR Block

This is the logical cluster management block, and handles node membership in the cluster using a heartbeat mechanism.QMGR is responsible for polling the data nodes when a data node failure occurs and determining that the node has actually failed and should be dropped from the cluster. This block contains the following files, found instorage/ndb/src/kernel/blocks/qmgr:

  • Qmgr.hpp: Defines the Qmgr class and associated structures, including those used in detection of node failure and cluster partitioning.

  • QmgrInit.cpp: Implements data and record initilization methods forQmgr, as well as its destructor.

  • QmgrMain.cpp: Contains routines for monitoring of heartbeats, detection and handling ofsplit-brain problems, and management of some startup phases.

  • timer.hpp: Defines theTimer class, used byNDB to keep strict timekeeping independent of the system clock.

This block also assists in the early phases of data node startup.

TheQMGR block is implemented by theQmgr class, whose definition is found in the filestorage/ndb/src/kernel/blocks/qmgr/Qmgr.hpp.