32#ifndef CLONE_SNAPSHOT_INCLUDE
33#define CLONE_SNAPSHOT_INCLUDE
298 uint arr_idx, uint64_t snap_id);
311 bool check_intr,
int &
error);
444 byte *temp_buffer, uint temp_buffer_len,
455 bool desc_create,
bool &desc_exists,
489 int add_page(uint32_t space_id, uint32_t page_num);
514 uint32_t hint_index);
527 byte *&data_buf, uint32_t &data_size, uint64_t &
file_size);
663 bool no_wait,
bool check_intr,
int &
error);
776 uint page_buffer_len);
809 uint32_t start_index);
822 byte *&data_buf, uint32_t &data_size, uint64_t &
file_size);
849 uint64_t file_offset, uint &num_chunks);
868 int add_file(
const char *
name, uint64_t size_bytes, uint64_t alloc_bytes,
914 std::string &file_path);
936 uint32_t data_file_index,
937 const std::string &data_file,
uint32_t space_id_t
Tablespace identifier.
Definition: api0api.h:46
Innodb interface for log archive.
Innodb interface for modified page archive.
Class used to report CLONE progress via Performance Schema.
Definition: clone0monitor.h:45
RAII style guard for begin & end of snapshot state transition.
Definition: clone0snapshot.h:265
Clone_Snapshot * m_snapshot
Clone Snapshot.
Definition: clone0snapshot.h:286
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:269
int get_error() const
Definition: clone0snapshot.h:276
State_transit(Clone_Snapshot *snapshot, Snapshot_State new_state)
Constructor to begin state transition.
Definition: clone0snapshot.cc:247
int m_error
Saved error while beginning transition.
Definition: clone0snapshot.h:289
Dynamic database snapshot: Holds metadata and handle to data.
Definition: clone0snapshot.h:262
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:758
int init_redo_archiving()
Start redo archiving.
Definition: clone0copy.cc:121
const char * wait_string(Wait_type wait_type) const
Get wait information string based on wait type.
Definition: clone0snapshot.cc:1243
uint m_num_duplicate_pages
Number of duplicate pages found.
Definition: clone0snapshot.h:1033
mem_heap_t * lock_heap()
Get snapshot heap used for allocation during clone.
Definition: clone0snapshot.h:351
void get_state_info(bool do_estimate, Clone_Desc_State *state_desc)
Fill state descriptor from snapshot.
Definition: clone0snapshot.cc:96
void end_ddl_file(Clone_notify::Type type, space_id_t space)
Handle files for DDL end notification.
Definition: clone0snapshot.cc:1541
uint32_t get_blocks_per_chunk() const
Definition: clone0snapshot.cc:528
uint64_t get_id()
Get unique snapshot identifier.
Definition: clone0snapshot.h:338
int wait_for_binlog_prepared_trx()
Wait for already prepared binlog transactions to end.
Definition: clone0copy.cc:453
uint64_t m_redo_start_offset
Start offset in first redo file.
Definition: clone0snapshot.h:1044
uint get_dyn_buffer_length()
Get maximum buffer size required for clone.
Definition: clone0snapshot.h:380
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:76
size_t num_redo_files() const
Definition: clone0snapshot.h:944
uint m_redo_header_size
Redo header size.
Definition: clone0snapshot.h:1050
Clone_Monitor & get_clone_monitor()
Get performance schema accounting object used to monitor stage progress.
Definition: clone0snapshot.h:347
void page_update_for_flush(const page_size_t &page_size, lsn_t page_lsn, byte *&page_data)
Definition: clone0snapshot.cc:804
uint32_t block_size()
Get block size for file copy.
Definition: clone0snapshot.h:886
Clone_Snapshot(Clone_Handle_Type hdl_type, Ha_clone_type clone_type, uint arr_idx, uint64_t snap_id)
Construct snapshot.
Definition: clone0snapshot.cc:44
bool in_transit_wait() const
Definition: clone0snapshot.h:749
ib_mutex_t m_snapshot_mutex
Mutex to handle access by concurrent clones.
Definition: clone0snapshot.h:964
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:789
uint m_num_current_chunks
Number of chunks in current state.
Definition: clone0snapshot.h:996
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:914
int pin_file(Clone_file_ctx *file_ctx, bool &handle_delete)
Wait for concurrent DDL file operation and pin file.
Definition: clone0snapshot.cc:1615
mem_heap_t * m_snapshot_heap
Memory allocation heap.
Definition: clone0snapshot.h:987
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:1207
Clone_File_Vec m_data_file_vector
All data files for transfer.
Definition: clone0snapshot.h:1004
size_t m_max_file_name_len
Maximum file name length observed till now.
Definition: clone0snapshot.h:999
uint32_t get_max_blocks_pin() const
Definition: clone0snapshot.cc:989
uint m_num_clones_transit
Number of clones in in state transition.
Definition: clone0snapshot.h:976
size_t num_data_files() const
Definition: clone0snapshot.h:941
uint32_t chunk_size() const
Get chunk size.
Definition: clone0snapshot.h:879
uint32_t m_num_blockers
Number of blockers for state change.
Definition: clone0snapshot.h:967
static const size_t S_FILE_NAME_BASE_LEN
File name allocation size base.
Definition: clone0snapshot.h:585
static const uint32_t S_MAX_BLOCKS_PIN
Allow DDL file operation after every block (1M data by default)
Definition: clone0snapshot.h:582
void release_heap(mem_heap_t *&heap)
Definition: clone0snapshot.h:357
int add_redo_file(char *file_name, uint64_t file_size, uint64_t file_offset)
Add redo file to snapshot.
Definition: clone0copy.cc:940
bool add_file_from_desc(Clone_file_ctx *&file_ctx, bool ddl_create)
Add file descriptor to file list.
Definition: clone0apply.cc:501
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:746
dberr_t add_node(fil_node_t *node, bool by_ddl)
Extract file information from node and add to snapshot.
Definition: clone0copy.cc:861
uint64_t m_data_bytes_disk
Number of bytes on disk.
Definition: clone0snapshot.h:1013
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:349
bool in_transit_state() const
Check if state transition is in progress.
Definition: clone0snapshot.h:742
uint get_index()
Get snapshot index in global array.
Definition: clone0snapshot.h:342
Snapshot_State get_state()
Get snapshot state.
Definition: clone0snapshot.h:364
uint64_t get_disk_estimate() const
Definition: clone0snapshot.h:334
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:553
void begin_transit(Snapshot_State new_state)
Begin state transition.
Definition: clone0snapshot.h:723
uint get_num_chunks()
Get total number of chunks for current state.
Definition: clone0snapshot.h:372
Log_Arch_Client_Ctx m_redo_ctx
redo log archiver client
Definition: clone0snapshot.h:1038
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:1282
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:613
void set_abort()
Set current snapshot aborted state.
Definition: clone0snapshot.cc:241
bool m_aborted
Set to true only if clone is aborted after error.
Definition: clone0snapshot.h:970
Clone_File_Meta * get_file_by_index(uint index)
Get file metadata by index for current state.
Definition: clone0snapshot.cc:280
void init_disk_estimate()
Initialize disk byte estimate.
Definition: clone0snapshot.h:764
Clone_Monitor m_monitor
Performance Schema accounting object to monitor stage progress.
Definition: clone0snapshot.h:1071
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:845
Snapshot_State get_next_state()
Get next state based on snapshot type.
Definition: clone0snapshot.cc:175
int init_redo_copy(Snapshot_State new_state, Clone_Alert_Func cbk)
Initialize snapshot state for redo copy.
Definition: clone0copy.cc:473
Snapshot_State m_snapshot_state
Current state.
Definition: clone0snapshot.h:979
void unblock_state_change()
Unblock clone state transition.
Definition: clone0snapshot.cc:1438
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:216
int update_binlog_position()
Make sure that the trx sys page binary log position correctly reflects all transactions committed to ...
Definition: clone0copy.cc:349
std::function< int(Clone_file_ctx *)> File_Cbk_Func
Definition: clone0snapshot.h:390
bool is_copy() const
Check if copy snapshot.
Definition: clone0snapshot.h:543
Clone_File_Map m_data_file_map
Map space ID to file vector index.
Definition: clone0snapshot.h:1007
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:994
uint m_snapshot_arr_idx
Index in global snapshot array.
Definition: clone0snapshot.h:959
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:1033
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:42
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:322
Clone_Page_Set m_page_set
Set of unique page IDs.
Definition: clone0snapshot.h:1024
Page_Arch_Client_Ctx m_page_ctx
Page archiver client.
Definition: clone0snapshot.h:1021
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:118
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:1487
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:1384
byte * m_redo_trailer
Redo trailer block.
Definition: clone0snapshot.h:1053
bool attach(Clone_Handle_Type hdl_type, bool pfs_monitor)
Try to attach to snapshot.
Definition: clone0snapshot.cc:207
int init_file_copy(Snapshot_State new_state)
Initialize snapshot state for file copy.
Definition: clone0copy.cc:183
Clone_Handle_Type m_snapshot_handle_type
Snapshot handle type.
Definition: clone0snapshot.h:950
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:1443
void detach()
Detach from snapshot.
Definition: clone0snapshot.cc:224
Clone_File_Vec m_redo_file_vector
All archived redo files to transfer.
Definition: clone0snapshot.h:1041
bool build_file_name(Clone_File_Meta *file_meta, const char *file_name)
Allocate and set clone file name.
Definition: clone0copy.cc:575
void set_state_info(Clone_Desc_State *state_desc)
Set state information during apply.
Definition: clone0snapshot.cc:136
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:1015
std::vector< int > m_undo_file_indexes
Index into m_data_file_vector for all undo files.
Definition: clone0snapshot.h:1016
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:1095
uint32_t get_chunk_size() const
Definition: clone0snapshot.h:534
int iterate_redo_files(File_Cbk_Func &&func)
Iterate through all redo files.
Definition: clone0snapshot.cc:339
Clone_Page_Vec m_page_vector
Sorted page IDs to transfer.
Definition: clone0snapshot.h:1027
uint32_t blocks_per_chunk() const
Get number of blocks per chunk for file copy.
Definition: clone0snapshot.h:895
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:738
Ha_clone_type m_snapshot_type
Clone type.
Definition: clone0snapshot.h:953
void begin_transit_ddl_wait()
Begin state transition before waiting for DDL.
Definition: clone0snapshot.h:713
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:461
uint m_num_redo_chunks
Total number of redo data chunks.
Definition: clone0snapshot.h:1065
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:674
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:406
static const uint32_t S_MAX_PAGES_PIN
Allow DDL file operation after 64 pages.
Definition: clone0snapshot.h:579
int add_buf_pool_file()
Add buffer pool dump file to the file list.
Definition: clone0copy.cc:89
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:664
int init_apply_state(Clone_Desc_State *state_desc)
Initialize state while applying cloned data.
Definition: clone0apply.cc:1672
int init_page_copy(Snapshot_State new_state, byte *page_buffer, uint page_buffer_len)
Initialize snapshot state for page copy.
Definition: clone0copy.cc:246
bool is_aborted() const
Definition: clone0snapshot.cc:236
uint m_num_clones
Number of clones attached to this snapshot.
Definition: clone0snapshot.h:973
void unpin_file(Clone_file_ctx *file_ctx)
Unpin a file.
Definition: clone0snapshot.h:326
uint64_t get_redo_file_size()
Get the redo file size for the snapshot.
Definition: clone0snapshot.h:368
int iterate_files(File_Cbk_Func &&func)
Iterate through all files in current state.
Definition: clone0snapshot.cc:311
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:1641
void debug_wait_state_transit()
Debug sync Wait during state transition.
Definition: clone0copy.cc:171
size_t get_max_file_name_length()
Get maximum file length seen till now.
Definition: clone0snapshot.h:376
void update_block_size(uint buff_size)
Update snapshot block size based on caller's buffer size.
Definition: clone0snapshot.cc:510
uint m_block_size_pow2
Block size in power of 2.
Definition: clone0snapshot.h:993
uint64_t m_redo_file_size
Archived redo file size.
Definition: clone0snapshot.h:1062
Snapshot_State m_snapshot_next_state
Next state to move to.
Definition: clone0snapshot.h:982
void skip_deleted_blocks(uint32_t chunk_num, uint32_t &block_num)
Skip all blocks belonging to currently deleted file context.
Definition: clone0snapshot.cc:636
uint m_num_data_chunks
Total number of data chunks.
Definition: clone0snapshot.h:1010
int extend_and_flush_files(bool flush_redo)
Extend and flush files after copying data.
Definition: clone0apply.cc:1722
uint m_num_pages
Number of pages to transfer.
Definition: clone0snapshot.h:1030
~Clone_Snapshot()
Release contexts and free heap.
Definition: clone0snapshot.cc:83
int wait_trx_end(THD *thd, trx_id_t trx_id)
Wait for a transaction to end.
Definition: clone0copy.cc:401
Wait_type
Various wait types related to snapshot state.
Definition: clone0snapshot.h:588
Clone_file_ctx * get_file_ctx_by_index(uint index)
Get clone file context by index for current state.
Definition: clone0snapshot.cc:289
uint m_chunk_size_pow2
Chunk size in power of 2.
Definition: clone0snapshot.h:990
int synchronize_binlog_gtid(Clone_Alert_Func cbk)
Synchronize snapshot with binary log and GTID.
Definition: clone0copy.cc:331
bool update_deleted_state(Clone_file_ctx *file_ctx)
Update deleted state of a file if not yet done.
Definition: clone0snapshot.cc:1601
byte * m_redo_header
Redo header block.
Definition: clone0snapshot.h:1047
uint64_t m_snapshot_id
Unique snapshot ID.
Definition: clone0snapshot.h:956
int iterate_data_files(File_Cbk_Func &&func)
Iterate through all data files.
Definition: clone0snapshot.cc:327
bool m_enable_pfs
Enable PFS monitoring.
Definition: clone0snapshot.h:1068
int fix_ddl_extension(const char *data_dir, Clone_file_ctx *file_ctx)
Fix files renamed with ddl extension.
Definition: clone0apply.cc:94
uint m_redo_trailer_size
Redo trailer size.
Definition: clone0snapshot.h:1056
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:621
void end_transit()
End state transition.
Definition: clone0snapshot.h:734
bool blocks_clone(const Clone_file_ctx *file_ctx)
Check if DDL needs to block clone operation.
Definition: clone0snapshot.cc:1463
uint64_t m_redo_trailer_offset
Redo trailer block offset.
Definition: clone0snapshot.h:1059
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:1020
void end_ddl_state(Clone_notify::Type type, space_id_t space)
DDL notification after the operation.
Definition: clone0snapshot.cc:1196
Type
Notification type.
Definition: clone0api.h:181
Redo Log archiver client context.
Definition: arch0log.h:47
os_offset_t current_physical_capacity() const
Provides maximum limitation for space occupied on disk.
Definition: log0files_capacity.cc:528
Dirty page archiver client context.
Definition: arch0page.h:169
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:35
Page identifier.
Definition: buf0types.h:206
Page size descriptor.
Definition: page0size.h:49
Innodb clone descriptors.
Snapshot_State
Snapshot state transfer during clone.
Definition: clone0desc.h:92
@ CLONE_SNAPSHOT_DONE
Snapshot state at end after finishing transfer.
Definition: clone0desc.h:109
@ CLONE_SNAPSHOT_NONE
Invalid state.
Definition: clone0desc.h:94
Performance Schema stage instrumentation to monitor clone progress.
std::function< int()> Clone_Alert_Func
Function to alert caller for long wait.
Definition: clone0monitor.h:42
std::vector< Clone_file_ctx * > Clone_File_Vec
Vector type for storing clone files.
Definition: clone0snapshot.h:197
std::vector< Clone_Page > Clone_Page_Vec
Vector type for storing clone page IDs.
Definition: clone0snapshot.h:232
const uint SNAPSHOT_MAX_BLOCK_SIZE_POW2
Maximum block size in power of 2 in unit of pages.
Definition: clone0snapshot.h:259
const uint SNAPSHOT_DEF_CHUNK_SIZE_POW2
Default chunk size in power of 2 in unit of pages.
Definition: clone0snapshot.h:249
Clone_Handle_Type
Clone handle type.
Definition: clone0snapshot.h:238
@ CLONE_HDL_APPLY
Clone Handle for APPLY.
Definition: clone0snapshot.h:243
@ CLONE_HDL_COPY
Clone Handle for COPY.
Definition: clone0snapshot.h:240
std::set< Clone_Page, Less_Clone_Page > Clone_Page_Set
Set for storing unique page IDs.
Definition: clone0snapshot.h:235
std::map< space_id_t, uint > Clone_File_Map
Map type for mapping space ID to clone file index.
Definition: clone0snapshot.h:200
const uint SNAPSHOT_DEF_BLOCK_SIZE_POW2
Default block size in power of 2 in unit of pages.
Definition: clone0snapshot.h:255
dberr_t
Definition: db0err.h:38
The low-level file system.
log_t * log_sys
Redo log system (singleton).
Definition: log0log.cc:434
uint64_t lsn_t
Type used for all log sequence number storage and arithmetic.
Definition: log0types.h:62
static size_t file_size
Definition: mysql_config_editor.cc:71
static bool replace
Definition: mysqlimport.cc:69
void * begin(THD *thd, const TABLE *table, size_t data_size, size_t memory, size_t num_threads) noexcept
Definition: bulk_data_service.cc:1533
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:93
wait_type
Definition: socket_constants.h:85
required string type
Definition: replication_group_member_actions.proto:33
Ha_clone_type
Clone operation types.
Definition: handler.h:966
@ HA_CLONE_BLOCKING
Caller must block all write operation to the SE.
Definition: handler.h:968
case opt name
Definition: sslopt-case.h:32
CLONE_DESC_STATE: Descriptor for current snapshot state.
Definition: clone0desc.h:438
Page identified by space and page number.
Definition: clone0snapshot.h:203
uint32_t m_page_no
Page number within tablespace.
Definition: clone0snapshot.h:208
uint32_t m_space_id
Tablespace ID.
Definition: clone0snapshot.h:205
Definition: clone0snapshot.h:48
void end_wait()
Finish waiting for DDL.
Definition: clone0snapshot.h:120
void set_ddl(Snapshot_State next_state)
Mark file added by DDL.
Definition: clone0snapshot.h:105
bool is_waiting() const
Definition: clone0snapshot.h:126
bool modifying() const
Definition: clone0snapshot.h:141
void unpin()
Unpin the file.
Definition: clone0snapshot.h:132
const Clone_File_Meta * get_file_meta_read() const
Definition: clone0snapshot.h:168
Extension
File extension to use with name.
Definition: clone0snapshot.h:75
bool deleting() const
Definition: clone0snapshot.h:147
uint32_t m_waiting
Waiting count incremented and decremented by clone tasks while waiting DDL file operation in progress...
Definition: clone0snapshot.h:184
std::atomic< uint32_t > m_pin
Pin count incremented and decremented by clone tasks to synchronize with concurrent DDL.
Definition: clone0snapshot.h:180
bool renamed() const
Definition: clone0snapshot.h:159
void pin()
Pin the file.
Definition: clone0snapshot.h:129
bool deleted() const
Definition: clone0snapshot.h:153
Clone_File_Meta m_meta
File metadata.
Definition: clone0snapshot.h:193
bool by_ddl(Snapshot_State state) const
Definition: clone0snapshot.h:112
void get_file_name(std::string &name) const
Get file name with extension.
Definition: clone0snapshot.cc:1071
Snapshot_State m_next_state
Next state when ddl last modified file.
Definition: clone0snapshot.h:190
Clone_File_Meta * get_file_meta()
Definition: clone0snapshot.h:165
State
File state: [CREATED] ----------—> [DROPPING] --> [DROPPED] --> [DROPPED_HANDLED] | ^ | | -—> [RENAMI...
Definition: clone0snapshot.h:57
std::atomic< State > m_state
File metadata state.
Definition: clone0snapshot.h:172
void init(Extension extn)
Initialize file state.
Definition: clone0snapshot.h:86
Extension m_extension
File name extension.
Definition: clone0snapshot.h:175
void begin_wait()
Start waiting for DDL.
Definition: clone0snapshot.h:117
bool m_modified_ddl
true, if file created or modified after clone is started.
Definition: clone0snapshot.h:187
bool is_pinned() const
Definition: clone0snapshot.h:138
Definition: ut0mutex.h:127
Comparator for storing sorted page ID.
Definition: clone0snapshot.h:212
bool operator()(const Clone_Page &page1, const Clone_Page &page2) const
Less than operator for page ID.
Definition: clone0snapshot.h:217
File node of a tablespace or the log data space.
Definition: fil0fil.h:150
ib_mutex_t limits_mutex
Mutex which protects fields: available_for_checkpoint_lsn, requested_checkpoint_lsn.
Definition: log0sys.h:599
Log_files_capacity m_capacity
Capacity limits for the redo log.
Definition: log0sys.h:430
The info structure stored at the beginning of a heap block.
Definition: mem0mem.h:301
ib_id_t trx_id_t
Transaction identifier (DB_TRX_ID, DATA_TRX_ID)
Definition: trx0types.h:137
Version control for database, common definitions, and include files.
#define UNIV_PAGE_SIZE
The universal page size of the database.
Definition: univ.i:293
#define UT_LOCATION_HERE
Definition: ut0core.h:72
#define ut_a(EXPR)
Abort execution if EXPR does not evaluate to nonzero.
Definition: ut0dbg.h:92
#define mutex_own(M)
Checks that the current thread owns the mutex.
Definition: ut0mutex.h:164
#define mutex_exit(M)
Definition: ut0mutex.h:122
#define mutex_enter(M)
Definition: ut0mutex.h:116
static uint32_t ut_2_exp(uint32_t n)
Calculates 2 to power n.