33#ifndef CLONE_SNAPSHOT_INCLUDE
34#define CLONE_SNAPSHOT_INCLUDE
299 uint arr_idx, uint64_t snap_id);
312 bool check_intr,
int &
error);
445 byte *temp_buffer,
uint temp_buffer_len,
456 bool desc_create,
bool &desc_exists,
490 int add_page(uint32_t space_id, uint32_t page_num);
515 uint32_t hint_index);
528 byte *&data_buf, uint32_t &data_size, uint64_t &
file_size);
664 bool no_wait,
bool check_intr,
int &
error);
777 uint page_buffer_len);
810 uint32_t start_index);
823 byte *&data_buf, uint32_t &data_size, uint64_t &
file_size);
850 uint64_t file_offset,
uint &num_chunks);
869 int add_file(
const char *
name, uint64_t size_bytes, uint64_t alloc_bytes,
915 std::string &file_path);
937 uint32_t data_file_index,
938 const std::string &data_file,
uint32_t space_id_t
Tablespace identifier.
Definition: api0api.h:52
Innodb interface for log archive.
Innodb interface for modified page archive.
Class used to report CLONE progress via Performance Schema.
Definition: clone0monitor.h:46
RAII style guard for begin & end of snapshot state transition.
Definition: clone0snapshot.h:266
Clone_Snapshot * m_snapshot
Clone Snapshot.
Definition: clone0snapshot.h:287
State_transit(State_transit const &)=delete
Disable copy construction.
State_transit & operator=(State_transit const &)=delete
Disable assignment.
~State_transit()
Destructor to end state transition.
Definition: clone0snapshot.cc:270
int get_error() const
Definition: clone0snapshot.h:277
State_transit(Clone_Snapshot *snapshot, Snapshot_State new_state)
Constructor to begin state transition.
Definition: clone0snapshot.cc:248
int m_error
Saved error while beginning transition.
Definition: clone0snapshot.h:290
Dynamic database snapshot: Holds metadata and handle to data.
Definition: clone0snapshot.h:263
bool encrypt_key_in_header(const page_size_t &page_size, byte *page_data)
Encrypt tablespace key in header page with master key.
Definition: clone0snapshot.cc:759
int init_redo_archiving()
Start redo archiving.
Definition: clone0copy.cc:122
const char * wait_string(Wait_type wait_type) const
Get wait information string based on wait type.
Definition: clone0snapshot.cc:1244
uint m_num_duplicate_pages
Number of duplicate pages found.
Definition: clone0snapshot.h:1034
mem_heap_t * lock_heap()
Get snapshot heap used for allocation during clone.
Definition: clone0snapshot.h:352
void get_state_info(bool do_estimate, Clone_Desc_State *state_desc)
Fill state descriptor from snapshot.
Definition: clone0snapshot.cc:97
void end_ddl_file(Clone_notify::Type type, space_id_t space)
Handle files for DDL end notification.
Definition: clone0snapshot.cc:1542
uint32_t get_blocks_per_chunk() const
Definition: clone0snapshot.cc:529
uint64_t get_id()
Get unique snapshot identifier.
Definition: clone0snapshot.h:339
int wait_for_binlog_prepared_trx()
Wait for already prepared binlog transactions to end.
Definition: clone0copy.cc:454
uint64_t m_redo_start_offset
Start offset in first redo file.
Definition: clone0snapshot.h:1045
uint get_dyn_buffer_length()
Get maximum buffer size required for clone.
Definition: clone0snapshot.h:381
int rename_desc(const Clone_File_Meta *file_meta, const char *data_dir, Clone_file_ctx *&file_ctx)
Rename an existing file descriptor.
Definition: clone0apply.cc:77
size_t num_redo_files() const
Definition: clone0snapshot.h:945
uint m_redo_header_size
Redo header size.
Definition: clone0snapshot.h:1051
Clone_Monitor & get_clone_monitor()
Get performance schema accounting object used to monitor stage progress.
Definition: clone0snapshot.h:348
void page_update_for_flush(const page_size_t &page_size, lsn_t page_lsn, byte *&page_data)
Definition: clone0snapshot.cc:805
uint32_t block_size()
Get block size for file copy.
Definition: clone0snapshot.h:887
Clone_Snapshot(Clone_Handle_Type hdl_type, Ha_clone_type clone_type, uint arr_idx, uint64_t snap_id)
Construct snapshot.
Definition: clone0snapshot.cc:45
bool in_transit_wait() const
Definition: clone0snapshot.h:750
ib_mutex_t m_snapshot_mutex
Mutex to handle access by concurrent clones.
Definition: clone0snapshot.h:965
void decrypt_key_in_header(const Clone_File_Meta *file_meta, const page_size_t &page_size, byte *&page_data)
Decrypt tablespace key in header page with master key.
Definition: clone0snapshot.cc:790
uint m_num_current_chunks
Number of chunks in current state.
Definition: clone0snapshot.h:997
int add_page(uint32_t space_id, uint32_t page_num)
Add page ID to to the set of pages in snapshot.
Definition: clone0copy.cc:915
int pin_file(Clone_file_ctx *file_ctx, bool &handle_delete)
Wait for concurrent DDL file operation and pin file.
Definition: clone0snapshot.cc:1616
mem_heap_t * m_snapshot_heap
Memory allocation heap.
Definition: clone0snapshot.h:988
void get_wait_mesg(Wait_type wait_type, std::string &info, std::string &error)
During wait get relevant message string for logging.
Definition: clone0snapshot.cc:1208
Clone_File_Vec m_data_file_vector
All data files for transfer.
Definition: clone0snapshot.h:1005
size_t m_max_file_name_len
Maximum file name length observed till now.
Definition: clone0snapshot.h:1000
uint32_t get_max_blocks_pin() const
Definition: clone0snapshot.cc:990
uint m_num_clones_transit
Number of clones in in state transition.
Definition: clone0snapshot.h:977
size_t num_data_files() const
Definition: clone0snapshot.h:942
uint32_t chunk_size() const
Get chunk size.
Definition: clone0snapshot.h:880
uint32_t m_num_blockers
Number of blockers for state change.
Definition: clone0snapshot.h:968
static const size_t S_FILE_NAME_BASE_LEN
File name allocation size base.
Definition: clone0snapshot.h:586
static const uint32_t S_MAX_BLOCKS_PIN
Allow DDL file operation after every block (1M data by default)
Definition: clone0snapshot.h:583
void release_heap(mem_heap_t *&heap)
Definition: clone0snapshot.h:358
int add_redo_file(char *file_name, uint64_t file_size, uint64_t file_offset)
Add redo file to snapshot.
Definition: clone0copy.cc:941
bool add_file_from_desc(Clone_file_ctx *&file_ctx, bool ddl_create)
Add file descriptor to file list.
Definition: clone0apply.cc:502
int add_file(const char *name, uint64_t size_bytes, uint64_t alloc_bytes, fil_node_t *node, bool by_ddl)
Add file to snapshot.
Definition: clone0copy.cc:747
dberr_t add_node(fil_node_t *node, bool by_ddl)
Extract file information from node and add to snapshot.
Definition: clone0copy.cc:862
uint64_t m_data_bytes_disk
Number of bytes on disk.
Definition: clone0snapshot.h:1014
int get_next_block(uint chunk_num, uint &block_num, const Clone_file_ctx *&file_ctx, uint64_t &data_offset, byte *&data_buf, uint32_t &data_size, uint64_t &file_size)
Get next block of data to transfer.
Definition: clone0snapshot.cc:350
bool in_transit_state() const
Check if state transition is in progress.
Definition: clone0snapshot.h:743
uint get_index()
Get snapshot index in global array.
Definition: clone0snapshot.h:343
Snapshot_State get_state()
Get snapshot state.
Definition: clone0snapshot.h:365
uint64_t get_disk_estimate() const
Definition: clone0snapshot.h:335
int change_state(Clone_Desc_State *state_desc, Snapshot_State new_state, byte *temp_buffer, uint temp_buffer_len, Clone_Alert_Func cbk)
Start transition to new state.
Definition: clone0snapshot.cc:554
void begin_transit(Snapshot_State new_state)
Begin state transition.
Definition: clone0snapshot.h:724
uint get_num_chunks()
Get total number of chunks for current state.
Definition: clone0snapshot.h:373
Log_Arch_Client_Ctx m_redo_ctx
redo log archiver client
Definition: clone0snapshot.h:1039
int wait(Wait_type type, const Clone_file_ctx *ctx, bool no_wait, bool check_intr)
Wait for various operations based on type.
Definition: clone0snapshot.cc:1283
Clone_file_ctx * get_file(Clone_File_Vec &file_vector, uint32_t chunk_num, uint32_t start_index)
Get file context for current chunk.
Definition: clone0snapshot.cc:614
void set_abort()
Set current snapshot aborted state.
Definition: clone0snapshot.cc:242
bool m_aborted
Set to true only if clone is aborted after error.
Definition: clone0snapshot.h:971
Clone_File_Meta * get_file_by_index(uint index)
Get file metadata by index for current state.
Definition: clone0snapshot.cc:281
void init_disk_estimate()
Initialize disk byte estimate.
Definition: clone0snapshot.h:765
Clone_Monitor m_monitor
Performance Schema accounting object to monitor stage progress.
Definition: clone0snapshot.h:1072
int get_page_for_write(const page_id_t &page_id, const page_size_t &page_size, const Clone_file_ctx *file_ctx, byte *&page_data, uint &data_size)
Get page from buffer pool and make ready for write.
Definition: clone0snapshot.cc:846
Snapshot_State get_next_state()
Get next state based on snapshot type.
Definition: clone0snapshot.cc:176
int init_redo_copy(Snapshot_State new_state, Clone_Alert_Func cbk)
Initialize snapshot state for redo copy.
Definition: clone0copy.cc:474
Snapshot_State m_snapshot_state
Current state.
Definition: clone0snapshot.h:980
void unblock_state_change()
Unblock clone state transition.
Definition: clone0snapshot.cc:1439
int handle_existing_file(bool replace, bool undo_file, bool redo_file, uint32_t data_file_index, const std::string &data_file, Clone_file_ctx::Extension &extn)
Check for existing file and if clone extension is needed.
Definition: clone0apply.cc:217
int update_binlog_position()
Make sure that the trx sys page binary log position correctly reflects all transactions committed to ...
Definition: clone0copy.cc:350
std::function< int(Clone_file_ctx *)> File_Cbk_Func
Definition: clone0snapshot.h:391
bool is_copy() const
Check if copy snapshot.
Definition: clone0snapshot.h:544
Clone_File_Map m_data_file_map
Map space ID to file vector index.
Definition: clone0snapshot.h:1008
Clone_file_ctx * get_file_ctx(uint32_t chunk_num, uint32_t block_num, uint32_t hint_index)
Get clone file context by chunk and block number.
Definition: clone0snapshot.cc:995
uint m_snapshot_arr_idx
Index in global snapshot array.
Definition: clone0snapshot.h:960
Clone_file_ctx * get_page_file_ctx(uint32_t chunk_num, uint32_t block_num)
Get clone page file context by chunk number and block number.
Definition: clone0snapshot.cc:1034
int get_file_from_desc(const Clone_File_Meta *file_meta, const char *data_dir, bool desc_create, bool &desc_exists, Clone_file_ctx *&file_ctx)
Add file metadata entry at destination.
Definition: clone0apply.cc:43
int build_file_path(const char *data_dir, const Clone_File_Meta *file_desc, std::string &file_path)
Build file name along with path for cloned data files.
Definition: clone0apply.cc:323
Clone_Page_Set m_page_set
Set of unique page IDs.
Definition: clone0snapshot.h:1025
Page_Arch_Client_Ctx m_page_ctx
Page archiver client.
Definition: clone0snapshot.h:1022
int update_sys_file_name(bool replace, const Clone_File_Meta *file_meta, std::string &file_name)
Update system file name from configuration.
Definition: clone0apply.cc:119
int begin_ddl_file(Clone_notify::Type type, space_id_t space, bool no_wait, bool check_intr)
Handle files for DDL begin notification.
Definition: clone0snapshot.cc:1488
bool block_state_change(Clone_notify::Type type, space_id_t space, bool no_wait, bool check_intr, int &error)
Block clone state transition.
Definition: clone0snapshot.cc:1385
byte * m_redo_trailer
Redo trailer block.
Definition: clone0snapshot.h:1054
bool attach(Clone_Handle_Type hdl_type, bool pfs_monitor)
Try to attach to snapshot.
Definition: clone0snapshot.cc:208
int init_file_copy(Snapshot_State new_state)
Initialize snapshot state for file copy.
Definition: clone0copy.cc:184
Clone_Handle_Type m_snapshot_handle_type
Snapshot handle type.
Definition: clone0snapshot.h:951
Clone_file_ctx::State get_target_file_state(Clone_notify::Type type, bool begin)
Get next file state while being modified by ddl.
Definition: clone0snapshot.cc:1444
void detach()
Detach from snapshot.
Definition: clone0snapshot.cc:225
Clone_File_Vec m_redo_file_vector
All archived redo files to transfer.
Definition: clone0snapshot.h:1042
bool build_file_name(Clone_File_Meta *file_meta, const char *file_name)
Allocate and set clone file name.
Definition: clone0copy.cc:576
void set_state_info(Clone_Desc_State *state_desc)
Set state information during apply.
Definition: clone0snapshot.cc:137
Clone_file_ctx * get_data_file_ctx(uint32_t chunk_num, uint32_t hint_index)
Get clone data file context by chunk number.
Definition: clone0snapshot.cc:1016
std::vector< int > m_undo_file_indexes
Index into m_data_file_vector for all undo files.
Definition: clone0snapshot.h:1017
bool begin_ddl_state(Clone_notify::Type type, space_id_t space, bool no_wait, bool check_intr, int &error)
DDL notification before the operation.
Definition: clone0snapshot.cc:1096
uint32_t get_chunk_size() const
Definition: clone0snapshot.h:535
int iterate_redo_files(File_Cbk_Func &&func)
Iterate through all redo files.
Definition: clone0snapshot.cc:340
Clone_Page_Vec m_page_vector
Sorted page IDs to transfer.
Definition: clone0snapshot.h:1028
uint32_t blocks_per_chunk() const
Get number of blocks per chunk for file copy.
Definition: clone0snapshot.h:896
bool encrypt_key_in_log_header(byte *log_header, uint32_t header_len)
Encrypt tablespace key in header page with master key.
Definition: clone0snapshot.cc:739
Ha_clone_type m_snapshot_type
Clone type.
Definition: clone0snapshot.h:954
void begin_transit_ddl_wait()
Begin state transition before waiting for DDL.
Definition: clone0snapshot.h:714
int create_desc(const char *data_dir, const Clone_File_Meta *file_meta, bool is_ddl, Clone_file_ctx *&file_ctx)
Create file descriptor and add to current file list.
Definition: clone0apply.cc:462
uint m_num_redo_chunks
Total number of redo data chunks.
Definition: clone0snapshot.h:1066
bool file_ctx_changed(const fil_node_t *node, Clone_file_ctx *&file_ctx)
Check if file context has been changed by ddl.
Definition: clone0copy.cc:675
int build_file_ctx(Clone_file_ctx::Extension extn, const Clone_File_Meta *file_meta, const std::string &file_path, Clone_file_ctx *&file_ctx)
Build file context from file path.
Definition: clone0apply.cc:407
static const uint32_t S_MAX_PAGES_PIN
Allow DDL file operation after 64 pages.
Definition: clone0snapshot.h:580
int add_buf_pool_file()
Add buffer pool dump file to the file list.
Definition: clone0copy.cc:90
int get_next_page(uint chunk_num, uint &block_num, const Clone_file_ctx *&file_ctx, uint64_t &data_offset, byte *&data_buf, uint32_t &data_size, uint64_t &file_size)
Get next page from buffer pool.
Definition: clone0snapshot.cc:665
int init_apply_state(Clone_Desc_State *state_desc)
Initialize state while applying cloned data.
Definition: clone0apply.cc:1673
int init_page_copy(Snapshot_State new_state, byte *page_buffer, uint page_buffer_len)
Initialize snapshot state for page copy.
Definition: clone0copy.cc:247
bool is_aborted() const
Definition: clone0snapshot.cc:237
uint m_num_clones
Number of clones attached to this snapshot.
Definition: clone0snapshot.h:974
void unpin_file(Clone_file_ctx *file_ctx)
Unpin a file.
Definition: clone0snapshot.h:327
uint64_t get_redo_file_size()
Get the redo file size for the snapshot.
Definition: clone0snapshot.h:369
int iterate_files(File_Cbk_Func &&func)
Iterate through all files in current state.
Definition: clone0snapshot.cc:312
void update_file_size(uint32_t file_index, uint64_t file_size)
Update file size when file is extended during page copy.
Definition: clone0apply.cc:1642
void debug_wait_state_transit()
Debug sync Wait during state transition.
Definition: clone0copy.cc:172
size_t get_max_file_name_length()
Get maximum file length seen till now.
Definition: clone0snapshot.h:377
void update_block_size(uint buff_size)
Update snapshot block size based on caller's buffer size.
Definition: clone0snapshot.cc:511
uint m_block_size_pow2
Block size in power of 2.
Definition: clone0snapshot.h:994
uint64_t m_redo_file_size
Archived redo file size.
Definition: clone0snapshot.h:1063
Snapshot_State m_snapshot_next_state
Next state to move to.
Definition: clone0snapshot.h:983
void skip_deleted_blocks(uint32_t chunk_num, uint32_t &block_num)
Skip all blocks belonging to currently deleted file context.
Definition: clone0snapshot.cc:637
uint m_num_data_chunks
Total number of data chunks.
Definition: clone0snapshot.h:1011
int extend_and_flush_files(bool flush_redo)
Extend and flush files after copying data.
Definition: clone0apply.cc:1723
uint m_num_pages
Number of pages to transfer.
Definition: clone0snapshot.h:1031
~Clone_Snapshot()
Release contexts and free heap.
Definition: clone0snapshot.cc:84
int wait_trx_end(THD *thd, trx_id_t trx_id)
Wait for a transaction to end.
Definition: clone0copy.cc:402
Wait_type
Various wait types related to snapshot state.
Definition: clone0snapshot.h:589
Clone_file_ctx * get_file_ctx_by_index(uint index)
Get clone file context by index for current state.
Definition: clone0snapshot.cc:290
uint m_chunk_size_pow2
Chunk size in power of 2.
Definition: clone0snapshot.h:991
int synchronize_binlog_gtid(Clone_Alert_Func cbk)
Synchronize snapshot with binary log and GTID.
Definition: clone0copy.cc:332
bool update_deleted_state(Clone_file_ctx *file_ctx)
Update deleted state of a file if not yet done.
Definition: clone0snapshot.cc:1602
byte * m_redo_header
Redo header block.
Definition: clone0snapshot.h:1048
uint64_t m_snapshot_id
Unique snapshot ID.
Definition: clone0snapshot.h:957
int iterate_data_files(File_Cbk_Func &&func)
Iterate through all data files.
Definition: clone0snapshot.cc:328
bool m_enable_pfs
Enable PFS monitoring.
Definition: clone0snapshot.h:1069
int fix_ddl_extension(const char *data_dir, Clone_file_ctx *file_ctx)
Fix files renamed with ddl extension.
Definition: clone0apply.cc:95
uint m_redo_trailer_size
Redo trailer size.
Definition: clone0snapshot.h:1057
Clone_file_ctx * build_file(const char *file_name, uint64_t file_size, uint64_t file_offset, uint &num_chunks)
Build file metadata entry.
Definition: clone0copy.cc:622
void end_transit()
End state transition.
Definition: clone0snapshot.h:735
bool blocks_clone(const Clone_file_ctx *file_ctx)
Check if DDL needs to block clone operation.
Definition: clone0snapshot.cc:1464
uint64_t m_redo_trailer_offset
Redo trailer block offset.
Definition: clone0snapshot.h:1060
Clone_file_ctx * get_redo_file_ctx(uint32_t chunk_num, uint32_t hint_index)
Get clone redo file context by chunk number.
Definition: clone0snapshot.cc:1021
void end_ddl_state(Clone_notify::Type type, space_id_t space)
DDL notification after the operation.
Definition: clone0snapshot.cc:1197
Type
Notification type.
Definition: clone0api.h:182
Redo Log archiver client context.
Definition: arch0log.h:48
os_offset_t current_physical_capacity() const
Provides maximum limitation for space occupied on disk.
Definition: log0files_capacity.cc:529
Dirty page archiver client context.
Definition: arch0page.h:170
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:34
Page identifier.
Definition: buf0types.h:207
Page size descriptor.
Definition: page0size.h:50
Innodb clone descriptors.
Snapshot_State
Snapshot state transfer during clone.
Definition: clone0desc.h:93
@ CLONE_SNAPSHOT_DONE
Snapshot state at end after finishing transfer.
Definition: clone0desc.h:110
@ CLONE_SNAPSHOT_NONE
Invalid state.
Definition: clone0desc.h:95
Performance Schema stage instrumentation to monitor clone progress.
std::function< int()> Clone_Alert_Func
Function to alert caller for long wait.
Definition: clone0monitor.h:43
std::vector< Clone_file_ctx * > Clone_File_Vec
Vector type for storing clone files.
Definition: clone0snapshot.h:198
std::vector< Clone_Page > Clone_Page_Vec
Vector type for storing clone page IDs.
Definition: clone0snapshot.h:233
const uint SNAPSHOT_MAX_BLOCK_SIZE_POW2
Maximum block size in power of 2 in unit of pages.
Definition: clone0snapshot.h:260
const uint SNAPSHOT_DEF_CHUNK_SIZE_POW2
Default chunk size in power of 2 in unit of pages.
Definition: clone0snapshot.h:250
Clone_Handle_Type
Clone handle type.
Definition: clone0snapshot.h:239
@ CLONE_HDL_APPLY
Clone Handle for APPLY.
Definition: clone0snapshot.h:244
@ CLONE_HDL_COPY
Clone Handle for COPY.
Definition: clone0snapshot.h:241
std::set< Clone_Page, Less_Clone_Page > Clone_Page_Set
Set for storing unique page IDs.
Definition: clone0snapshot.h:236
std::map< space_id_t, uint > Clone_File_Map
Map type for mapping space ID to clone file index.
Definition: clone0snapshot.h:201
const uint SNAPSHOT_DEF_BLOCK_SIZE_POW2
Default block size in power of 2 in unit of pages.
Definition: clone0snapshot.h:256
dberr_t
Definition: db0err.h:39
The low-level file system.
log_t * log_sys
Redo log system (singleton).
Definition: log0log.cc:435
uint64_t lsn_t
Type used for all log sequence number storage and arithmetic.
Definition: log0types.h:63
static size_t file_size
Definition: mysql_config_editor.cc:71
static bool replace
Definition: mysqlimport.cc:66
std::string file_name(Log_file_id file_id)
Provides name of the log file with the given file id, e.g.
Definition: log0pre_8_0_30.cc:94
wait_type
Definition: socket_constants.h:86
required string type
Definition: replication_group_member_actions.proto:34
Ha_clone_type
Clone operation types.
Definition: handler.h:960
@ HA_CLONE_BLOCKING
Caller must block all write operation to the SE.
Definition: handler.h:962
case opt name
Definition: sslopt-case.h:33
CLONE_DESC_STATE: Descriptor for current snapshot state.
Definition: clone0desc.h:439
Page identified by space and page number.
Definition: clone0snapshot.h:204
uint32_t m_page_no
Page number within tablespace.
Definition: clone0snapshot.h:209
uint32_t m_space_id
Tablespace ID.
Definition: clone0snapshot.h:206
Definition: clone0snapshot.h:49
void end_wait()
Finish waiting for DDL.
Definition: clone0snapshot.h:121
void set_ddl(Snapshot_State next_state)
Mark file added by DDL.
Definition: clone0snapshot.h:106
bool is_waiting() const
Definition: clone0snapshot.h:127
bool modifying() const
Definition: clone0snapshot.h:142
void unpin()
Unpin the file.
Definition: clone0snapshot.h:133
const Clone_File_Meta * get_file_meta_read() const
Definition: clone0snapshot.h:169
Extension
File extension to use with name.
Definition: clone0snapshot.h:76
bool deleting() const
Definition: clone0snapshot.h:148
uint32_t m_waiting
Waiting count incremented and decremented by clone tasks while waiting DDL file operation in progress...
Definition: clone0snapshot.h:185
std::atomic< uint32_t > m_pin
Pin count incremented and decremented by clone tasks to synchronize with concurrent DDL.
Definition: clone0snapshot.h:181
bool renamed() const
Definition: clone0snapshot.h:160
void pin()
Pin the file.
Definition: clone0snapshot.h:130
bool deleted() const
Definition: clone0snapshot.h:154
Clone_File_Meta m_meta
File metadata.
Definition: clone0snapshot.h:194
bool by_ddl(Snapshot_State state) const
Definition: clone0snapshot.h:113
void get_file_name(std::string &name) const
Get file name with extension.
Definition: clone0snapshot.cc:1072
Snapshot_State m_next_state
Next state when ddl last modified file.
Definition: clone0snapshot.h:191
Clone_File_Meta * get_file_meta()
Definition: clone0snapshot.h:166
State
File state: [CREATED] ----------—> [DROPPING] --> [DROPPED] --> [DROPPED_HANDLED] | ^ | | -—> [RENAMI...
Definition: clone0snapshot.h:58
std::atomic< State > m_state
File metadata state.
Definition: clone0snapshot.h:173
void init(Extension extn)
Initialize file state.
Definition: clone0snapshot.h:87
Extension m_extension
File name extension.
Definition: clone0snapshot.h:176
void begin_wait()
Start waiting for DDL.
Definition: clone0snapshot.h:118
bool m_modified_ddl
true, if file created or modified after clone is started.
Definition: clone0snapshot.h:188
bool is_pinned() const
Definition: clone0snapshot.h:139
Definition: ut0mutex.h:128
Comparator for storing sorted page ID.
Definition: clone0snapshot.h:213
bool operator()(const Clone_Page &page1, const Clone_Page &page2) const
Less than operator for page ID.
Definition: clone0snapshot.h:218
File node of a tablespace or the log data space.
Definition: fil0fil.h:155
ib_mutex_t limits_mutex
Mutex which protects fields: available_for_checkpoint_lsn, requested_checkpoint_lsn.
Definition: log0sys.h:596
Log_files_capacity m_capacity
Capacity limits for the redo log.
Definition: log0sys.h:431
The info structure stored at the beginning of a heap block.
Definition: mem0mem.h:302
ib_id_t trx_id_t
Transaction identifier (DB_TRX_ID, DATA_TRX_ID)
Definition: trx0types.h:138
unsigned int uint
Definition: uca9-dump.cc:75
Version control for database, common definitions, and include files.
#define UNIV_PAGE_SIZE
The universal page size of the database.
Definition: univ.i:294
#define UT_LOCATION_HERE
Definition: ut0core.h:47
#define ut_a(EXPR)
Abort execution if EXPR does not evaluate to nonzero.
Definition: ut0dbg.h:57
#define mutex_own(M)
Checks that the current thread owns the mutex.
Definition: ut0mutex.h:165
#define mutex_exit(M)
Definition: ut0mutex.h:123
#define mutex_enter(M)
Definition: ut0mutex.h:117
static uint32_t ut_2_exp(uint32_t n)
Calculates 2 to power n.