MySQL 8.3.0
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...
 
bool m_parallel {}
 If true then use parallel scan and index build. More...
 
size_t m_sort_buffer_size {}
 Sort buffer size. More...
 
size_t m_io_buffer_size {}
 IO buffer size. 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()

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

Constructor.

Parameters
[in,out]ctxDDL context.

◆ ~Loader()

Loader::~Loader ( )
noexcept

Destructor.

Member Function Documentation

◆ add_task()

void Loader::add_task ( Task  task)
noexcept

Add a task to the task queue.

Parameters
[in]taskTask to add.

◆ build_all()

dberr_t Loader::build_all ( )
noexcept

Build the read instance.

Returns
DB_SUCCESS or error code.

◆ load()

dberr_t Loader::load ( )
privatenoexcept

Load the indexes.

Returns
DB_SUCCESS or error code.

◆ prepare()

dberr_t Loader::prepare ( )
privatenoexcept

Prepare to build and load the indexes.

Returns
DB_SUCCESS or error code.

◆ scan_and_build_indexes()

dberr_t Loader::scan_and_build_indexes ( )
privatenoexcept

Scan and build the indexes.

Returns
DB_SUCCESS or error code.

◆ validate_indexes()

bool 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_io_buffer_size

size_t ddl::Loader::m_io_buffer_size {}
private

IO buffer size.

◆ m_parallel

bool ddl::Loader::m_parallel {}
private

If true then use parallel scan and index build.

◆ m_sort_buffer_size

size_t ddl::Loader::m_sort_buffer_size {}
private

Sort buffer size.

◆ m_taskq

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

Task queue.


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