MySQL 8.0.39
Source Code Documentation
fil::detail::Open_files_limit Class Reference

#include <open_files_limit.h>

Classes

class  Dynamic_procedures
 

Public Member Functions

 Open_files_limit (size_t limit)
 
 ~Open_files_limit ()
 
size_t get_limit () const
 
bool set_desired_limit (size_t desired)
 
void commit_desired_limit ()
 
void revert_desired_limit ()
 

Private Attributes

Dynamic_procedures m_dynamic_procedures
 
std::atomic< size_t > m_limit
 The maximum limit for opened files. More...
 
size_t m_old_limit
 The old value of the limit when a change is in progress. More...
 
std::atomic_flag m_is_change_in_progress
 Atomic flag stating if a change of the limit is in progress. More...
 

Static Private Attributes

static constexpr int MINIMUM_VALID_VALUE = 10
 

Constructor & Destructor Documentation

◆ Open_files_limit()

fil::detail::Open_files_limit::Open_files_limit ( size_t  limit)
inline

◆ ~Open_files_limit()

fil::detail::Open_files_limit::~Open_files_limit ( )
inline

Member Function Documentation

◆ commit_desired_limit()

void fil::detail::Open_files_limit::commit_desired_limit ( )
inline

◆ get_limit()

size_t fil::detail::Open_files_limit::get_limit ( ) const
inline

◆ revert_desired_limit()

void fil::detail::Open_files_limit::revert_desired_limit ( )
inline

◆ set_desired_limit()

bool fil::detail::Open_files_limit::set_desired_limit ( size_t  desired)
inline

Member Data Documentation

◆ m_dynamic_procedures

Dynamic_procedures fil::detail::Open_files_limit::m_dynamic_procedures
private

◆ m_is_change_in_progress

std::atomic_flag fil::detail::Open_files_limit::m_is_change_in_progress
private

Atomic flag stating if a change of the limit is in progress.

Used to disallow multiple threads from processing a limit change.

◆ m_limit

std::atomic<size_t> fil::detail::Open_files_limit::m_limit
private

The maximum limit for opened files.

fil_n_files_open should not exceed this. It can be changed dynamically by Fil_system::set_open_files_limit() method.

◆ m_old_limit

size_t fil::detail::Open_files_limit::m_old_limit
private

The old value of the limit when a change is in progress.

It is used in case we need to rollback.

◆ MINIMUM_VALID_VALUE

constexpr int fil::detail::Open_files_limit::MINIMUM_VALID_VALUE = 10
staticconstexprprivate

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