MySQL  8.0.19
Source Code Documentation
Validate_files Class Reference

Validate the DD tablespace data against what's read during the directory scan on startup. More...

Public Member Functions

 Validate_files ()
 Constructor. More...
 
dberr_t validate (const DD_tablespaces &tablespaces, size_t *moved_count)
 Validate the tablespaces against the DD. More...
 

Private Types

using DD_tablespaces = std::vector< const dd::Tablespace * >
 
using Const_iter = DD_tablespaces::const_iterator
 

Private Member Functions

void check (const Const_iter &begin, const Const_iter &end, size_t thread_id, size_t *moved_count)
 Validate the tablespace filenames. More...
 
bool failed () const
 
size_t checked () const
 
space_id_t get_space_max_id () const
 

Private Attributes

std::mutex m_mutex
 Mutex protecting the parallel check. More...
 
space_id_t m_space_max_id
 Maximum tablespace ID found. More...
 
size_t m_n_threads
 Number of threads used in the parallel for. More...
 
std::atomic_size_t m_checked
 Number of tablespaces checked. More...
 
std::atomic_size_t m_n_errors
 Number of threads that failed. More...
 

Detailed Description

Validate the DD tablespace data against what's read during the directory scan on startup.

Member Typedef Documentation

◆ Const_iter

using Validate_files::Const_iter = DD_tablespaces::const_iterator
private

◆ DD_tablespaces

using Validate_files::DD_tablespaces = std::vector<const dd::Tablespace *>
private

Constructor & Destructor Documentation

◆ Validate_files()

Validate_files::Validate_files ( )
inline

Constructor.

Member Function Documentation

◆ check()

void Validate_files::check ( const Const_iter begin,
const Const_iter end,
size_t  thread_id,
size_t *  moved_count 
)
private

Validate the tablespace filenames.

Parameters
[in]beginStart of the slice
[in]endEnd of the slice
[in]thread_idThread ID
[in]moved_countNumber of files that were moved

◆ checked()

size_t Validate_files::checked ( ) const
inlineprivate
Returns
the number of tablespaces checked.

◆ failed()

bool Validate_files::failed ( ) const
inlineprivate
Returns
true if there were failures.

◆ get_space_max_id()

space_id_t Validate_files::get_space_max_id ( ) const
inlineprivate
Returns
the maximum tablespace ID found.

◆ validate()

dberr_t Validate_files::validate ( const DD_tablespaces tablespaces,
size_t *  moved_count 
)

Validate the tablespaces against the DD.

Parameters
[in]tablespacesTablespace files read from the DD
[out]moved_countNumber of tablespaces that have moved
Returns
DB_SUCCESS if all OK
Parameters
[in]tablespacesTablespace files read from the DD
Returns
DB_SUCCESS if all OK

Member Data Documentation

◆ m_checked

std::atomic_size_t Validate_files::m_checked
private

Number of tablespaces checked.

◆ m_mutex

std::mutex Validate_files::m_mutex
private

Mutex protecting the parallel check.

◆ m_n_errors

std::atomic_size_t Validate_files::m_n_errors
private

Number of threads that failed.

◆ m_n_threads

size_t Validate_files::m_n_threads
private

Number of threads used in the parallel for.

◆ m_space_max_id

space_id_t Validate_files::m_space_max_id
private

Maximum tablespace ID found.


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