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 theAttributeOffset
class, 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 theDbtup
class.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 byDbtup
to 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 ofDbtup
is 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 (thePageRange
struct 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_buffer
class, used for storage of operations that may need to be rolled back.Undo_buffer.cpp
: Implements some necessaryUndo_buffer
methods.DbtupCommit.cpp
: Contains routines used to commit operations on tuples to disk.DbtupGen.cpp
: This file containsDbtup
initialization routines.DbtupPagMan.cpp
: This file implements the page memory manager's “buddy” algorithm.PagMan
is 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 ofNDB
internal triggers.DbtupDebug.cpp
: Used for debugging purposes only.Dbtup.hpp
: Contains theDbtup
class definition. Also defines a number of essential structures such as tuple scans, disk allocation units, fragment records, and so on.DbtupRoutines.cpp
: ImplementsDbtup
routines for reading attributes.DbtupVarAlloc.cpp
test_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.