MySQL 26.7.0
Source Code Documentation
mysql::scheduler Namespace Reference

Namespaces

namespace  anonymous_namespace{scheduler.cpp}
 
namespace  anonymous_namespace{sharded_counter.cpp}
 
namespace  detail
 

Classes

class  Base_dependency_tracker
 Base interface for a dependency tracker. More...
 
class  Clock_lwm_registry
 Clock implementation that computes LWM (Low Water Mark) based on executed tasks. More...
 
class  Commit_order_clock
 
struct  Constants
 
class  Delayed_schedule
 Represents Schedule for one-shot, delayed task. More...
 
struct  Dependency_tracker_psi
 Dependency_tracker instrumentation parameters, packed into this structure to simplify construction of a Dependency_tracker class instance and prevent mistakes when passing a lot of integer parameters into the class constructor. More...
 
class  Dependency_tracker_single_predecessor
 An example of Dependency Tracker implementation that tracks a single task predecessor. More...
 
class  Dependency_tracker_stub
 Dependency tracker stub: empty tracker, does not check dependencies. More...
 
class  Repeatable_task_state
 Shared state for one logical repeatable scheduler task. More...
 
class  Schedule_factory
 Schedule factory class - creates task schedule object pointer based on input parameters. More...
 
class  Scheduled_task
 Represents task that is scheduled in the priority queue. More...
 
class  Scheduler
 Main scheduling class. More...
 
class  Scheduler_clock
 Interface for clock implementations scheduler uses to schedule tasks. More...
 
struct  Scheduler_clock_psi
 Scheduler_clock instrumentation parameters, packed into this structure to simplify construction of a Scheduler_clock class instance and prevent mistakes when passing a lot of integer parameters into the class constructor. More...
 
struct  Scheduler_psi
 Scheduler instrumentation parameters, packed into this structure to simplify construction of a Scheduler class instance and prevent mistakes when passing a lot of integer parameters into the class constructor. More...
 
class  Scoped_dispatch_reason
 
class  Sharded_counter
 Concurrent counter, relaxing contention on atomic counter when being updated by different threads. More...
 
struct  Statistic_type_traits
 Helper structure that translates types between underlying supported statistic type and concrete concurrent counter / type implementation. More...
 
struct  Statistic_type_traits< long long >
 Specialization of Statistic_type_traits with long long statistic type. More...
 
class  Statistics_instance_monitor
 CSA statistics monitor, gathers statistics coming from different CSA threads Each statistic is a pair of key (statistic string) and value. More...
 
class  Statistics_map
 Supported statistics: More...
 
class  Statistics_monitor
 Singleton Statistics Monitor for all of the registered "instances". More...
 
class  Task_id
 Represents the identifier of a task ingested by the scheduler,. More...
 
class  Task_registry
 This template maintains the registry of tasks, with specific object types. More...
 
class  Task_registry_multi
 This template class provides a concurrent registry for tasks that handles hash conflicts by allowing multiple task entries to coexist in the same hash bucket. More...
 
struct  Task_registry_psi
 Task_registry instrumentation parameters, packed into this structure to simplify construction of a Task_registry class instance and prevent mistakes when passing a lot of integer parameters into the class constructor. More...
 
class  Task_schedule
 Represents task schedule. More...
 
class  Task_sequencer
 Simple class to assign consecutive ids. More...
 
class  Thread_pool
 MySQL wrapper for a condition variable, template which may be specialized with a specific implementation of a condition variable, e.g. More...
 
struct  Thread_pool_psi
 Thread_pool instrumentation parameters, packed into this structure to simplify construction of a Thread_pool class instance and prevent mistakes when passing a lot of integer parameters into the class constructor. More...
 
class  Transaction_order_schedule
 Represents schedule for a transaction executing in two phases: apply and committing, where commit must follow the commit order. More...
 

Concepts

concept  Statistic_allowed_type
 

Typedefs

using Dependency_tracker_ptr = std::unique_ptr< Base_dependency_tracker >
 
using Repeatable_task_state_ptr = std::shared_ptr< Repeatable_task_state >
 
using Scheduler_clock_ptr = std::shared_ptr< Scheduler_clock >
 
using Statistics_instance_monitor_ref = std::reference_wrapper< Statistics_instance_monitor >
 
using Task_schedule_ptr = std::shared_ptr< Task_schedule >
 
using Time_delay_type = std::uint64_t
 Time points are created as a delay from a specific start time (clock relative measure) More...
 

Enumerations

enum class  Dispatch_reason { normal , unblocked }
 
enum class  Sync_method { active }
 
enum class  Scheduler_status {
  idle , check_dependencies , check_queue , scheduling ,
  exiting_scheduler_thread , exited_scheduler_thread , final_sync , exit
}
 
enum class  Scheduler_dependency_type { end_to_start , start_to_start }
 
enum class  Task_result { success , error_retry , fatal_error }
 Acceptable task state after its execution. More...
 

Functions

Dispatch_reason current_dispatch_reason ()
 
std::ostream & operator<< (std::ostream &os, const Task_id &obj)
 

Variables

thread_local Dispatch_reason current_dispatch_reason_tls
 
constexpr std::size_t clock_unblock_delta {4}
 When unblocking, we tweak clock by this count. More...
 

Typedef Documentation

◆ Dependency_tracker_ptr

◆ Repeatable_task_state_ptr

◆ Scheduler_clock_ptr

using mysql::scheduler::Scheduler_clock_ptr = typedef std::shared_ptr<Scheduler_clock>

◆ Statistics_instance_monitor_ref

◆ Task_schedule_ptr

using mysql::scheduler::Task_schedule_ptr = typedef std::shared_ptr<Task_schedule>

◆ Time_delay_type

using mysql::scheduler::Time_delay_type = typedef std::uint64_t

Time points are created as a delay from a specific start time (clock relative measure)

Enumeration Type Documentation

◆ Dispatch_reason

Enumerator
normal 
unblocked 

◆ Scheduler_dependency_type

Enumerator
end_to_start 
start_to_start 

◆ Scheduler_status

Enumerator
idle 
check_dependencies 
check_queue 
scheduling 
exiting_scheduler_thread 
exited_scheduler_thread 
final_sync 
exit 

◆ Sync_method

enum class mysql::scheduler::Sync_method
strong
Enumerator
active 

◆ Task_result

enum class mysql::scheduler::Task_result
strong

Acceptable task state after its execution.

Enumerator
success 

Task executed successfully.

error_retry 

Task resulted in an error, should retry.

fatal_error 

Fatal error which we cannot recover and need to stop.

Function Documentation

◆ current_dispatch_reason()

Dispatch_reason mysql::scheduler::current_dispatch_reason ( )
inline

◆ operator<<()

std::ostream & mysql::scheduler::operator<< ( std::ostream &  os,
const Task_id obj 
)

Variable Documentation

◆ clock_unblock_delta

constexpr std::size_t mysql::scheduler::clock_unblock_delta {4}
inlineconstexpr

When unblocking, we tweak clock by this count.

◆ current_dispatch_reason_tls

thread_local Dispatch_reason mysql::scheduler::current_dispatch_reason_tls
inline
Initial value:
=
Dispatch_reason::normal