From 3e8b6a79b7169f1b0526169b5c752920e8babf44 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Mon, 16 Jan 2023 10:23:22 +1100 Subject: [PATCH 1/3] Update sponsors --- CREDITS | 2 -- 1 file changed, 2 deletions(-) diff --git a/CREDITS b/CREDITS index 35092602ccf9a..9534d3e6e833a 100644 --- a/CREDITS +++ b/CREDITS @@ -9,10 +9,8 @@ MariaDB Corporation https://www.mariadb.com (2013) Microsoft https://microsoft.com/ (2017) ServiceNow https://servicenow.com (2019) SIT https://sit.org (2022) -Tencent Cloud https://cloud.tencent.com (2017) Development Bank of Singapore https://dbs.com (2016) IBM https://www.ibm.com (2017) -Visma https://visma.com (2015) Automattic https://automattic.com (2019) Galera Cluster https://galeracluster.com (2020) Percona https://www.percona.com (2018) From 834650c7cfb53773bbb64b6ab874e23b43b8c874 Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Mon, 16 Jan 2023 14:59:59 +0100 Subject: [PATCH 2/3] New CC 3.1 --- libmariadb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmariadb b/libmariadb index 7fdb3eab66384..d204e83104222 160000 --- a/libmariadb +++ b/libmariadb @@ -1 +1 @@ -Subproject commit 7fdb3eab66384a355475704332d11cc1ab82499a +Subproject commit d204e83104222844251b221e9be7eb3dd9f8d63d From 489b556947087f7606224d6fc09f302eabef14c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Tue, 17 Jan 2023 17:52:16 +0200 Subject: [PATCH 3/3] MDEV-30422 Merge new release of InnoDB 5.7.41 to 10.3 MySQL 5.7.41 includes one InnoDB change mysql/mysql-server@d2d6b2dd00f709bc528386009150d4bc726e25a0 that seems to be applicable to MariaDB Server 10.3 and 10.4. Even though commit 5b9ee8d8193a8c7a8ebdd35eedcadc3ae78e7fc1 seems to have fixed sporadic failures on our CI systems, it is theoretically possible that another race condition remained. buf_flush_page_cleaner_coordinator(): In the final loop, wait also for buf_get_n_pending_read_ios() to reach 0. In this way, if a secondary index leaf page was read into the buffer pool and ibuf_merge_or_delete_for_page() modified that page or some change buffer pages, the flush loop would execute until the buffer pool really is in a clean state. This potential data corruption bug does not affect MariaDB Server 10.5 or later, thanks to commit b42294bc6409794bdbd2051b32fa079d81cea61d which removed change buffer merges that are not explicitly requested. --- storage/innobase/buf/buf0flu.cc | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/storage/innobase/buf/buf0flu.cc b/storage/innobase/buf/buf0flu.cc index 6e97be03bddfe..b8f8c243a4fa8 100644 --- a/storage/innobase/buf/buf0flu.cc +++ b/storage/innobase/buf/buf0flu.cc @@ -3324,20 +3324,27 @@ DECLARE_THREAD(buf_flush_page_cleaner_coordinator)(void*) bool success; do { + /* In case an asynchronous read request was posted by + any thread (other than something invoking + ibuf_merge_in_background()), it is possible that the + change buffer will be merged to the page once the read + completes. To avoid race conditions and corruption due + to that, we will loop here until there are no pending + page read operations. */ + success = !buf_get_n_pending_read_ios(); pc_request(ULINT_MAX, LSN_MAX); while (pc_flush_slot() > 0) {} ulint n_flushed_lru = 0; ulint n_flushed_list = 0; - success = pc_wait_finished(&n_flushed_lru, &n_flushed_list); - - n_flushed = n_flushed_lru + n_flushed_list; + success = pc_wait_finished(&n_flushed_lru, &n_flushed_list) + && success && !n_flushed_lru && !n_flushed_list; buf_flush_wait_batch_end(NULL, BUF_FLUSH_LIST); buf_flush_wait_LRU_batch_end(); - } while (!success || n_flushed > 0); + } while (!success); /* Some sanity checks */ ut_a(srv_get_active_thread_type() == SRV_NONE);