summaryrefslogtreecommitdiff
path: root/extra/mariabackup/xtrabackup.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-10-26 16:04:12 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2020-10-26 17:53:54 +0200
commit118e258aaac5da75a2ac4556201aaea3688fac67 (patch)
tree9153ac366b4791fd1f9ed515fff770f5974bf8b9 /extra/mariabackup/xtrabackup.cc
parent45ed9dd957eebc7fc84feb2509f4aa6baa908a95 (diff)
downloadmariadb-git-118e258aaac5da75a2ac4556201aaea3688fac67.tar.gz
MDEV-23855: Shrink fil_space_t
Merge n_pending_ios, n_pending_ops to std::atomic<uint32_t> n_pending. Change some more fil_space_t members to uint32_t to reduce the memory footprint. fil_space_t::add(), fil_ibd_create(): Attach the already opened handle to the tablespace, and enforce the fil_system.n_open limit. dict_boot(): Initialize fil_system.max_assigned_id. srv_boot(): Call srv_thread_pool_init() before anything else, so that files should be opened in the correct mode on Windows. fil_ibd_create(): Create the file in OS_FILE_AIO mode, just like fil_node_open_file_low() does it. dict_table_t::is_accessible(): Replaces fil_table_accessible(). Reviewed by: Vladislav Vaintroub
Diffstat (limited to 'extra/mariabackup/xtrabackup.cc')
-rw-r--r--extra/mariabackup/xtrabackup.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc
index 39025862276..c05677b8810 100644
--- a/extra/mariabackup/xtrabackup.cc
+++ b/extra/mariabackup/xtrabackup.cc
@@ -3094,10 +3094,10 @@ xb_load_single_table_tablespace(
ut_a(space != NULL);
- space->add(file->filepath(), OS_FILE_CLOSED, 0, false, false);
- /* by opening the tablespace we forcing node and space objects
- in the cache to be populated with fields from space header */
- space->get_size();
+ space->add(file->filepath(), file->detach(), 0, false, false);
+ mutex_enter(&fil_system.mutex);
+ space->read_page0();
+ mutex_exit(&fil_system.mutex);
if (srv_operation == SRV_OPERATION_RESTORE_DELTA
|| xb_close_files) {
@@ -3402,7 +3402,7 @@ xb_load_tablespaces()
/** Destroy the tablespace memory cache. */
static void xb_data_files_close()
{
- fil_close_all_files();
+ fil_space_t::close_all();
buf_dblwr.close();
}