119 ulong target_rollback_segments);
189#define TRX_RSEG_N_SLOTS (UNIV_PAGE_SIZE / 16)
192#define TRX_RSEG_MAX_N_TRXS (TRX_RSEG_N_SLOTS / 2)
220#define TRX_RSEG_SLOT_END \
221 (TRX_RSEG_UNDO_SLOTS + TRX_RSEG_SLOT_SIZE * TRX_RSEG_N_SLOTS)
226#define TRX_RSEG_MAX_TRX_NO TRX_RSEG_SLOT_END
uint32_t space_id_t
Tablespace identifier.
Definition: api0api.h:48
uint32_t page_no_t
Page number.
Definition: api0api.h:46
List of undo tablespace IDs.
Definition: trx0sys.h:351
Page size descriptor.
Definition: page0size.h:50
constexpr uint32_t FSEG_PAGE_DATA
On a page of any file segment, data may be put starting from this offset.
Definition: fsp0types.h:79
constexpr uint32_t FSEG_HEADER_SIZE
Length of the file system header, in bytes.
Definition: fsp0types.h:94
File-based list utilities.
constexpr ulint FLST_BASE_NODE_SIZE
Definition: fut0lst.h:50
Mini-transaction handle and buffer.
Definition: mtr0mtr.h:177
The rollback segment memory object.
Definition: trx0types.h:214
page_no_t trx_rseg_create(space_id_t space_id, ulint rseg_id)
Create a rollback segment in the given tablespace.
Definition: trx0rseg.cc:712
bool trx_rseg_init_rollback_segments(space_id_t space_id, ulong target_rollback_segments)
Create the requested number of Rollback Segments in a newly created undo tablespace and add them to t...
Definition: trx0rseg.cc:1025
constexpr uint32_t TRX_RSEG_UNDO_SLOTS
Undo log segment slots.
Definition: trx0rseg.h:216
void trx_rseg_array_create(space_id_t space_id, mtr_t *mtr)
Create the file page for the rollback segment directory in an undo tablespace.
Definition: trx0rseg.cc:1132
constexpr uint32_t TRX_RSEG_MAX_SIZE
Maximum allowed size for rollback segment in pages.
Definition: trx0rseg.h:208
void trx_rseg_upgrade_undo_tablespaces()
Upgrade the TRX_SYS page so that it no longer tracks rsegs in undo tablespaces other than the system ...
Definition: trx0rseg.cc:1084
void trx_rseg_get_n_undo_tablespaces(Space_Ids *spaces_to_open)
Build a list of unique undo tablespaces found in the TRX_SYS page.
Definition: trx0rseg.cc:1046
void trx_rsegs_init(purge_pq_t *purge_queue)
Read each rollback segment slot in the TRX_SYS page and the RSEG_ARRAY page of each undo tablespace.
Definition: trx0rseg.cc:615
constexpr uint32_t RSEG_ARRAY_SIZE_OFFSET
The current number of rollback segments being tracked in this array.
Definition: trx0rseg.h:245
constexpr uint32_t RSEG_ARRAY_HEADER
The offset of the Rollback Segment Directory header on an RSEG_ARRAY page.
Definition: trx0rseg.h:232
page_no_t trx_rseg_header_create(space_id_t space_id, const page_size_t &page_size, page_no_t max_size, ulint rseg_slot, mtr_t *mtr)
Creates a rollback segment header.
Definition: trx0rseg.cc:60
void trx_rsegs_parallel_init(purge_pq_t *purge_queue)
Initialize rollback segments in parallel.
Definition: trx0rseg.cc:564
constexpr uint32_t RSEG_ARRAY_SLOT_SIZE
Definition: trx0rseg.h:262
constexpr uint32_t RSEG_ARRAY_PAGES_OFFSET
The start of the array of rollback segment header page numbers for this undo tablespace.
Definition: trx0rseg.h:255
constexpr uint32_t TRX_RSEG_HISTORY_SIZE
Number of file pages occupied by the logs in the history list.
Definition: trx0rseg.h:210
constexpr uint32_t TRX_RSEG_HISTORY
Definition: trx0rseg.h:212
constexpr uint32_t TRX_RSEG_SLOT_SIZE
Slot size.
Definition: trx0rseg.h:200
static void trx_rsegsf_set_page_no(trx_rsegsf_t *rsegs_header, ulint slot, page_no_t page_no, mtr_t *mtr)
Sets the page number of the nth rollback segment slot in the independent undo tablespace.
trx_rseg_t * trx_rseg_mem_create(ulint id, space_id_t space_id, page_no_t page_no, const page_size_t &page_size, trx_id_t gtid_trx_no, purge_pq_t *purge_queue, mtr_t *mtr)
Create and initialize a rollback segment object.
Definition: trx0rseg.cc:366
static trx_rsegf_t * trx_rsegf_get_new(space_id_t space, page_no_t page_no, const page_size_t &page_size, mtr_t *mtr)
Gets a newly created rollback segment header.
static page_no_t trx_rsegf_get_nth_undo(trx_rsegf_t *rsegf, ulint n, mtr_t *mtr)
Gets the file page number of the nth undo log slot.
static trx_rsegf_t * trx_rsegf_get(space_id_t space, page_no_t page_no, const page_size_t &page_size, mtr_t *mtr)
Gets a rollback segment header.
constexpr uint32_t TRX_RSEG_SLOT_PAGE_NO
Page number of the header page of an undo log segment.
Definition: trx0rseg.h:197
constexpr uint32_t RSEG_ARRAY_RESERVED_BYTES
Reserved space at the end of an RSEG_ARRAY page reserved for future use.
Definition: trx0rseg.h:259
static void trx_rsegf_set_nth_undo(trx_rsegf_t *rsegf, ulint n, page_no_t page_no, mtr_t *mtr)
Sets the file page number of the nth undo log slot.
constexpr uint32_t RSEG_ARRAY_VERSION_OFFSET
The RSEG ARRAY version offset in the header.
Definition: trx0rseg.h:242
constexpr uint32_t TRX_RSEG
The offset of the rollback segment header on its page.
Definition: trx0rseg.h:203
constexpr uint32_t RSEG_ARRAY_FSEG_HEADER_OFFSET
This is the pointer to the file segment inode that tracks this rseg array page.
Definition: trx0rseg.h:249
static ulint trx_rsegf_undo_find_free(trx_rsegf_t *rsegf, mtr_t *mtr)
Looks for a free slot for an undo log segment.
bool trx_rseg_adjust_rollback_segments(ulong target_rollback_segments)
Add more rsegs to the rseg list in each tablespace until there are srv_rollback_segments of them.
Definition: trx0rseg.cc:979
constexpr uint32_t TRX_RSEG_FSEG_HEADER
Definition: trx0rseg.h:214
constexpr uint32_t RSEG_ARRAY_VERSION
Rollback Segment Array Header.
Definition: trx0rseg.h:239
Transaction system global type definitions.
std::priority_queue< TrxUndoRsegs, std::vector< TrxUndoRsegs, ut::allocator< TrxUndoRsegs > >, TrxUndoRsegs > purge_pq_t
Definition: trx0types.h:631
byte trx_rsegsf_t
Rollback segment array header.
Definition: trx0types.h:157
byte trx_rsegf_t
Rollback segment header.
Definition: trx0types.h:159
ib_id_t trx_id_t
Transaction identifier (DB_TRX_ID, DATA_TRX_ID)
Definition: trx0types.h:138
Version control for database, common definitions, and include files.
unsigned long int ulint
Definition: univ.i:406
int n
Definition: xcom_base.cc:509