![]() |
MySQL 26.7.0
Source Code Documentation
|
Service that provides a free session to executing transactions. More...
#include <session_service_bounded_queue.h>
Public Types | |
| using | Task_id = Session_service::Task_id |
| Alias for task identifier from base class. More... | |
Public Types inherited from mysql::csa::Session_service | |
| using | Task_id = mysql::scheduler::Task_id |
| Alias for task identifier. More... | |
Public Member Functions | |
| Session_service_bounded_queue (Session_service_psi psi_params={}) | |
| Constructor. More... | |
| virtual | ~Session_service_bounded_queue () override |
| Virtual destructor. More... | |
| bool | init (std::size_t session_number, Relay_log_info *channel_rli) override |
| Initializes the session service with a bounded queue. More... | |
| bool | deinit () override |
| Deinitializes the session service. More... | |
| Relay_context_ptr | acquire_session (Task_id id) override |
| Acquires a session for the given task ID. More... | |
| void | release_session (Relay_context_ptr session, Task_id id) override |
| Releases a session back to the pool. More... | |
Public Member Functions inherited from mysql::csa::Session_service | |
| virtual | ~Session_service ()=default |
| Virtual destructor. More... | |
| std::optional< Session_legacy_stats > | get_session_stats (std::size_t session_id) |
| Obtains session statistics. More... | |
| virtual std::size_t | get_session_number () |
| Obtains the number of all sessions. More... | |
| void | clean_sessions () |
| Performs clean up of sessions, including rollback. More... | |
| void | enable_stop_error_suppression_for_clean_sessions () |
| Enables stop error suppression for sessions that have no reported error. More... | |
| bool | has_thd_id (unsigned int thd_id) const |
| Checks whether session service contains a given THD thread id. More... | |
| void | awake_sessions (bool force_kill) |
| Awakes sessions to faster end execution. More... | |
Private Types | |
| using | Relay_context_entry = std::shared_ptr< Relay_context > |
| Type alias for a shared pointer to Relay_context. More... | |
| using | Session_registry = mysql::concurrency::Sync_bounded_queue< Relay_context_ptr, tune::csa_session_default_cache_size > |
| Type alias for the synchronized bounded queue of Relay_context_ptr. More... | |
Private Attributes | |
| Session_registry | m_sessions |
| The session registry queue. More... | |
| std::size_t | m_session_number {tune::csa_session_default_cache_size} |
| The number of maintained sessions. More... | |
| Relay_log_info * | m_channel_rli {nullptr} |
| Pointer to the channel RLI (to share data, such as applier privileges) More... | |
| Session_service_psi | m_psi |
| PSI parameters. More... | |
Additional Inherited Members | |
Protected Attributes inherited from mysql::csa::Session_service | |
| std::unordered_map< std::size_t, Relay_context_ptr > | m_all_sessions |
| Aggregates all sessions in order to look at specific session data. More... | |
| std::unordered_set< unsigned int > | m_thd_ids |
| Captured THD identifiers for easy access. More... | |
Service that provides a free session to executing transactions.
|
private |
Type alias for a shared pointer to Relay_context.
|
private |
Type alias for the synchronized bounded queue of Relay_context_ptr.
Alias for task identifier from base class.
| mysql::csa::Session_service_bounded_queue::Session_service_bounded_queue | ( | Session_service_psi | psi_params = {} | ) |
Constructor.
| psi_params | Instrumentation parameters |
|
overridevirtual |
Virtual destructor.
|
overridevirtual |
Acquires a session for the given task ID.
| id | The task ID |
Implements mysql::csa::Session_service.
|
overridevirtual |
Deinitializes the session service.
Implements mysql::csa::Session_service.
|
overridevirtual |
Initializes the session service with a bounded queue.
| session_number | The number of sessions to add to initial pool |
| channel_rli | Parent RLI - channel RLI to share common applier config |
Implements mysql::csa::Session_service.
|
overridevirtual |
Releases a session back to the pool.
| session | Session to return to the session pool |
| id | Session internal ID |
Implements mysql::csa::Session_service.
|
private |
Pointer to the channel RLI (to share data, such as applier privileges)
|
private |
PSI parameters.
|
private |
The number of maintained sessions.
|
private |
The session registry queue.