MySQL 8.0.40
Source Code Documentation
ddl::Loader Class Reference

Build indexes on a table by reading a clustered index, creating a temporary file containing index entries, merge sorting these index entries and inserting sorted index entries to indexes. More...

#include <ddl0impl-loader.h>

Classes

struct  Task
 Builder task. More...
 
class  Task_queue
 Unbounded task queue. More...
 

Public Member Functions

 Loader (ddl::Context &ctx) noexcept
 Constructor. More...
 
 ~Loader () noexcept
 Destructor. More...
 
dberr_t build_all () noexcept
 Build the read instance. More...
 
void add_task (Task task) noexcept
 Add a task to the task queue. More...
 
bool validate_indexes () const noexcept
 Validate the indexes (except FTS). More...
 

Private Member Functions

dberr_t prepare () noexcept
 Prepare to build and load the indexes. More...
 
dberr_t load () noexcept
 Load the indexes. More...
 
dberr_t scan_and_build_indexes () noexcept
 Scan and build the indexes. More...
 

Private Attributes

ddl::Contextm_ctx
 DDL context, shared by the loader threads. More...
 
Builders m_builders {}
 Index builders. More...
 
Task_queuem_taskq {}
 Task queue. More...
 

Detailed Description

Build indexes on a table by reading a clustered index, creating a temporary file containing index entries, merge sorting these index entries and inserting sorted index entries to indexes.

Constructor & Destructor Documentation

◆ Loader()

ddl::Loader::Loader ( ddl::Context ctx)
explicitnoexcept

Constructor.

Parameters
[in,out]ctxDDL context.

◆ ~Loader()

ddl::Loader::~Loader ( )
noexcept

Destructor.

Member Function Documentation

◆ add_task()

void ddl::Loader::add_task ( Task  task)
noexcept

Add a task to the task queue.

Parameters
[in]taskTask to add.

◆ build_all()

dberr_t ddl::Loader::build_all ( )
noexcept

Build the read instance.

Returns
DB_SUCCESS or error code.

◆ load()

dberr_t ddl::Loader::load ( )
privatenoexcept

Load the indexes.

Returns
DB_SUCCESS or error code.

◆ prepare()

dberr_t ddl::Loader::prepare ( )
privatenoexcept

Prepare to build and load the indexes.

Returns
DB_SUCCESS or error code.

◆ scan_and_build_indexes()

dberr_t ddl::Loader::scan_and_build_indexes ( )
privatenoexcept

Scan and build the indexes.

Returns
DB_SUCCESS or error code.

◆ validate_indexes()

bool ddl::Loader::validate_indexes ( ) const
noexcept

Validate the indexes (except FTS).

Returns
true on success.

Member Data Documentation

◆ m_builders

Builders ddl::Loader::m_builders {}
private

Index builders.

◆ m_ctx

ddl::Context& ddl::Loader::m_ctx
private

DDL context, shared by the loader threads.

◆ m_taskq

Task_queue* ddl::Loader::m_taskq {}
private

Task queue.


The documentation for this class was generated from the following files: