NDB Cluster Internals  /  NDB Kernel Blocks  /  The DBDIH Block

4.5 The DBDIH Block

This block provides data distribution management services for distribution information about each table, table partition, and fragment replica of each partition. It is also responsible for handling of local and global checkpoints. DBDIH also manages node and system restarts. This block is implemented in the following files, all found in the directory storage/ndb/src/kernel/blocks/dbdih:

  • Dbdih.hpp: This file contains the definition of the Dbdih class, as well as the FileRecordPtr type, which is used to keep storage information about a fragment and its fragment replicas. If a fragment has more than one backup fragment replica, then a list of the additional ones is attached to this record. This record also stores the status of the fragment, and is 64-byte aligned.

  • DbdihMain.cpp: Contains definitions of Dbdih class methods.

  • printSysfile/printSysfile.cpp: Older version of the printSysfile.cpp in the main dbdih directory.

  • DbdihInit.cpp: Initializes Dbdih data and records; also contains the class destructor.

  • LCP.txt: Contains developer notes about the exchange of messages between DIH and LQH that takes place during a local checkpoint.

  • printSysfile.cpp: This file contains the source code for the ndb_print_sys_file utility program.

  • Sysfile.hpp: Contains the definition of the Sysfile structure; in other words, the format of an NDB system file. See Chapter 1, NDB Cluster File Systems, for more information about NDB system files.

This block often makes use of BACKUP blocks on the data nodes to accomplish distributed tasks, such as global checkpoints and system restarts.

This block is implemented as the Dbdih class, whose definition may be found in the file storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp.