From 118e258aaac5da75a2ac4556201aaea3688fac67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Mon, 26 Oct 2020 16:04:12 +0200 Subject: MDEV-23855: Shrink fil_space_t Merge n_pending_ios, n_pending_ops to std::atomic 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 --- storage/innobase/ibuf/ibuf0ibuf.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'storage/innobase/ibuf') diff --git a/storage/innobase/ibuf/ibuf0ibuf.cc b/storage/innobase/ibuf/ibuf0ibuf.cc index 9e9bc241828..5c9d7955c90 100644 --- a/storage/innobase/ibuf/ibuf0ibuf.cc +++ b/storage/innobase/ibuf/ibuf0ibuf.cc @@ -2300,7 +2300,7 @@ static void ibuf_read_merge_pages(const uint32_t* space_ids, for (ulint i = 0; i < n_stored; i++) { const ulint space_id = space_ids[i]; - fil_space_t* s = fil_space_t::get_for_io(space_id); + fil_space_t* s = fil_space_t::get(space_id); if (!s) { tablespace_deleted: /* The tablespace was not found: remove all @@ -2314,7 +2314,7 @@ tablespace_deleted: } const ulint zip_size = s->zip_size(), size = s->size; - s->release_for_io(); + s->release(); mtr_t mtr; if (UNIV_LIKELY(page_nos[i] < size)) { @@ -4028,7 +4028,7 @@ ibuf_restore_pos( return true; } - if (fil_space_t* s = fil_space_acquire_silent(page_id.space())) { + if (fil_space_t* s = fil_space_t::get(page_id.space())) { ib::error() << "ibuf cursor restoration fails!" " ibuf record inserted to page " << page_id @@ -4214,7 +4214,7 @@ ibuf_merge_or_delete_for_page( fil_space_t* space; if (update_ibuf_bitmap) { - space = fil_space_acquire_silent(page_id.space()); + space = fil_space_t::get(page_id.space()); if (UNIV_UNLIKELY(!space)) { /* Do not try to read the bitmap page from the -- cgit v1.2.1