Clone plugin handler to convenient way to.
More...
#include <clone_handler.h>
|
int | validate_dir (const char *in_dir, char *out_dir) |
| Validate clone data directory and convert to os format. More...
|
|
Clone plugin handler to convenient way to.
Takes
◆ Clone_handler()
Clone_handler::Clone_handler |
( |
const char * |
plugin_name_arg | ) |
|
|
inline |
Constructor: Initialize plugin name.
◆ begin_xa_operation()
void Clone_handler::begin_xa_operation |
( |
THD * |
thd | ) |
|
|
staticprivate |
Increment XA operation count and wait if blocked by clone.
- Parameters
-
◆ block_xa_operation()
bool Clone_handler::block_xa_operation |
( |
THD * |
thd | ) |
|
|
staticprivate |
Block new active XA operations and wait for existing ones to complete.
- Parameters
-
◆ clone_local()
int Clone_handler::clone_local |
( |
THD * |
thd, |
|
|
const char * |
data_dir |
|
) |
| |
Clone handler interface for local clone.
- Parameters
-
[in] | thd | server thread handle |
[in] | data_dir | cloned data directory |
- Returns
- error code
◆ clone_remote_client()
int Clone_handler::clone_remote_client |
( |
THD * |
thd, |
|
|
const char * |
remote_host, |
|
|
uint |
remote_port, |
|
|
const char * |
remote_user, |
|
|
const char * |
remote_passwd, |
|
|
const char * |
data_dir, |
|
|
enum mysql_ssl_mode |
ssl_mode |
|
) |
| |
Clone handler interface for remote clone client.
- Parameters
-
[in] | thd | server thread handle |
[in] | remote_host | remote host IP address |
[in] | remote_port | remote server port |
[in] | remote_user | remote user name |
[in] | remote_passwd | remote user's password |
[in] | data_dir | cloned data directory |
[in] | ssl_mode | remote connection ssl mode |
- Returns
- error code
◆ clone_remote_server()
Clone handler interface for remote clone server.
- Parameters
-
[in] | thd | server thread handle |
[in] | socket | network socket to remote client |
- Returns
- error code
◆ end_xa_operation()
void Clone_handler::end_xa_operation |
( |
| ) |
|
|
staticprivate |
Decrement XA operation count.
◆ get_donor_error()
bool Clone_handler::get_donor_error |
( |
Srv_session * |
session, |
|
|
int & |
error, |
|
|
const char *& |
message |
|
) |
| |
|
static |
Get donor error and message for ER_CLONE_DONOR error.
- Parameters
-
[in] | session | server session |
[out] | error | donor error number |
[out] | message | error message |
- Returns
- true, iff successful.
◆ init()
int Clone_handler::init |
( |
| ) |
|
Initialize plugin handle.
- Returns
- error code
◆ init_xa()
void Clone_handler::init_xa |
( |
| ) |
|
|
static |
◆ is_data_dropped()
static bool Clone_handler::is_data_dropped |
( |
| ) |
|
|
inlinestatic |
- Returns
- false only if no user data is dropped yet.
◆ is_provisioning()
static bool Clone_handler::is_provisioning |
( |
| ) |
|
|
inlinestatic |
- Returns
- true, if clone provisioning in progress.
◆ need_commit_order()
static bool Clone_handler::need_commit_order |
( |
| ) |
|
|
inlinestatic |
- Returns
- true, if ordered commit should be forced. Currently clone would force ordered commit at end while blocking XA operations
◆ set_drop_data()
static void Clone_handler::set_drop_data |
( |
| ) |
|
|
inlinestatic |
Must set before dropping any user data.
◆ unblock_xa_operation()
void Clone_handler::unblock_xa_operation |
( |
| ) |
|
|
staticprivate |
Unblock waiting XA operations.
◆ uninit_xa()
void Clone_handler::uninit_xa |
( |
| ) |
|
|
static |
◆ validate_dir()
int Clone_handler::validate_dir |
( |
const char * |
in_dir, |
|
|
char * |
out_dir |
|
) |
| |
|
private |
Validate clone data directory and convert to os format.
- Parameters
-
[in] | in_dir | user specified clone directory |
[out] | out_dir | data directory in native os format |
- Returns
- error code
◆ m_plugin_handle
◆ m_plugin_name
std::string Clone_handler::m_plugin_name |
|
private |
◆ s_is_data_dropped
std::atomic< bool > Clone_handler::s_is_data_dropped {false} |
|
staticprivate |
True, if any user data is dropped by clone.
◆ s_provision_in_progress
std::atomic< int > Clone_handler::s_provision_in_progress {0} |
|
staticprivate |
True if clone provisioning in progress.
◆ s_xa_block_op
std::atomic< bool > Clone_handler::s_xa_block_op {false} |
|
staticprivate |
Set when clone blocks XA operations.
XA operations currently are not ordered between binlog and SE and needs to be synchronized for clone.
◆ s_xa_counter
std::atomic< int > Clone_handler::s_xa_counter {0} |
|
staticprivate |
Number of XA operations (prepare/commit/rollback) in progress.
◆ s_xa_mutex
Mutex to synchronize blocking XA operation.
The documentation for this class was generated from the following files: