This is the tuple manager, which manages the physical storage of
cluster data. It consists of the following files found in the
directory
storage/ndb/src/kernel/blocks/dbtup:
AttributeOffset.hpp: Defines theAttributeOffsetclass, which models the structure of an attribute, permitting up to 4096 attributes, all of which are nullable.DbtupDiskAlloc.cpp: Handles allocation and deallocation of extents for disk space.DbtupIndex.cpp: Implements methods for reading and writing tuples using ordered indexes.DbtupScan.cpp: Implements methods for tuple scans.tuppage.cpp: Handles allocating pages for writing tuples.tuppage.hpp: Defines structures for fixed and variable size data pages for tuples.DbtupAbort.cpp: Contains routines for terminating failed tuple operations.DbtupExecQuery.cpp: Handles execution of queries for tuples and reading from them.DbtupMeta.cpp: Handle table operations for theDbtupclass.DbtupStoredProcDef.cpp: Module for adding and dropping procedures.DbtupBuffer.cpp: Handles read/write buffers for tuple operations.DbtupFixAlloc.cpp: Allocates and frees fixed-size tuples from the set of pages attatched to a fragment. The fixed size is set per fragment; there can be only one such value per fragment.DbtupPageMap.cpp: Routines used byDbtupto map logical page IDs to physical page IDs. The mapping needs the fragment ID and the logical page ID to provide the physical ID. This part ofDbtupis the exclusive user of a certain set of variables on the fragment record; it is also the exclusive user of the struct for page ranges (thePageRangestruct defined inDbtup.hpp).DbtupTabDesMan.cpp: This file contains the routines making up the table descriptor memory manager. Each table has a descriptor, which is a contiguous array of data words, and which is allocated from a global array using a “buddy” algorithm, with free lists existing for each 2N words.Notes.txt: Contains some developers' implementation notes on tuples, tuple operations, and tuple versioning.Undo_buffer.hpp: Defines theUndo_bufferclass, used for storage of operations that may need to be rolled back.Undo_buffer.cpp: Implements some necessaryUndo_buffermethods.DbtupCommit.cpp: Contains routines used to commit operations on tuples to disk.DbtupGen.cpp: This file containsDbtupinitialization routines.DbtupPagMan.cpp: This file implements the page memory manager's “buddy” algorithm.PagManis invoked when fragments lack sufficient internal page space to accommodate all the data they are requested to store. It is also invoked when fragments deallocate page space back to the free area.DbtupTrigger.cpp: The routines contained in this file perform handling ofNDBinternal triggers.DbtupDebug.cpp: Used for debugging purposes only.Dbtup.hpp: Contains theDbtupclass definition. Also defines a number of essential structures such as tuple scans, disk allocation units, fragment records, and so on.DbtupRoutines.cpp: ImplementsDbtuproutines for reading attributes.DbtupVarAlloc.cpptest_varpage.cpp: Simple test program for verifying variable-size page operations.
This block also monitors changes in tuples.
DBQTUP is a subtype of this block, used for
query and recovery threads, added in NDB 8.0.23.