![]() |
MySQL 26.7.0
Source Code Documentation
|
Represents schedule for a transaction executing in two phases: apply and committing, where commit must follow the commit order. More...
#include <transaction_order_schedule.h>
Public Types | |
| enum class | Phase { prepare = 0 , commit = 1 } |
Public Member Functions | |
| Transaction_order_schedule (Task_id task_id, Scheduler_clock_ptr trx_clock, uint64_t trx_time, Scheduler_clock_ptr commit_clock, uint64_t commit_time) | |
| Constructor. More... | |
| bool | next () override |
| This function modifies the state of the schedule to next state. More... | |
| const Time_delay_type & | get_task_delay () const override |
| Gets information about next execution time. More... | |
| bool | is_finished () const override |
| const Scheduler_clock_ptr & | get_clock () const override |
| Obtain task clock. More... | |
| const Task_id & | get_id () const override |
| Obtain task id. More... | |
| const Time_delay_type & | get_phase_delay (unsigned int phase_id) const override |
| Gets information about execution time in specific phase. More... | |
| const Scheduler_clock_ptr & | get_phase_clock (unsigned int phase_id) const override |
| Obtain task clock for the given phase id. More... | |
| unsigned int | get_phase_id () const override |
| Returns current phase id (sequence number) More... | |
Public Member Functions inherited from mysql::scheduler::Task_schedule | |
| Task_schedule () | |
| Constructor sets the task delay to a given value. More... | |
| bool | has_higher_priority (const Task_schedule &arg, int phase) const |
| Compare two task schedules to indicate which task should run first. More... | |
| virtual | ~Task_schedule ()=default |
| Destructor. More... | |
| void | set_enqueued_by_scheduler () |
| Sets the flag indicating that the task was enqueued by the scheduler. More... | |
| bool | is_enqueued_by_scheduler () const |
| Checks if the task was enqueued by the scheduler. More... | |
| bool | is_phase_ready () const |
| Checks if the current phase is ready for execution. More... | |
| void | set_phase_ready () |
| Sets the phase ready flag to true. More... | |
Private Attributes | |
| Task_id | m_task_id |
| This task id. More... | |
| Scheduler_clock_ptr | m_trx_clock |
| Clock whole task schedule is based on. More... | |
| uint64_t | m_trx_time |
| Transaction start execution time, relative to the m_trx_clock. More... | |
| Scheduler_clock_ptr | m_commit_clock |
| Commit clock, dependency clock for commit phase. More... | |
| uint64_t | m_commit_time |
| Transaction commit start time, relative to the commit clock. More... | |
| unsigned int | m_phase {0} |
| Current schedule phase. More... | |
Represents schedule for a transaction executing in two phases: apply and committing, where commit must follow the commit order.
|
strong |
| mysql::scheduler::Transaction_order_schedule::Transaction_order_schedule | ( | Task_id | task_id, |
| Scheduler_clock_ptr | trx_clock, | ||
| uint64_t | trx_time, | ||
| Scheduler_clock_ptr | commit_clock, | ||
| uint64_t | commit_time | ||
| ) |
Constructor.
constructs schedule for tranctions executing commit order
| task_id | Task identifier |
| trx_clock | Clock transaction schedule is based on |
| trx_time | Delay w.r.t. trx_clock start point |
| commit_clock | Clock transaction commit schedule is based on |
| commit_time | Delay w.r.t. trx_clock start point |
|
overridevirtual |
Obtain task clock.
Implements mysql::scheduler::Task_schedule.
|
overridevirtual |
Obtain task id.
Implements mysql::scheduler::Task_schedule.
|
overridevirtual |
Obtain task clock for the given phase id.
| phase_id | Selected phase sequence number |
Reimplemented from mysql::scheduler::Task_schedule.
|
overridevirtual |
Gets information about execution time in specific phase.
| phase_id | Selected phase sequence number |
Reimplemented from mysql::scheduler::Task_schedule.
|
overridevirtual |
Returns current phase id (sequence number)
Reimplemented from mysql::scheduler::Task_schedule.
|
overridevirtual |
Gets information about next execution time.
Implements mysql::scheduler::Task_schedule.
|
overridevirtual |
Implements mysql::scheduler::Task_schedule.
|
overridevirtual |
This function modifies the state of the schedule to next state.
Implements mysql::scheduler::Task_schedule.
|
private |
Commit clock, dependency clock for commit phase.
|
private |
Transaction commit start time, relative to the commit clock.
|
private |
Current schedule phase.
|
private |
This task id.
|
private |
Clock whole task schedule is based on.
|
private |
Transaction start execution time, relative to the m_trx_clock.