From 207b64058a734a8a3a5388cd6c205c29924d702b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Thu, 3 Mar 2022 18:51:12 +0200 Subject: MDEV-24845 : Oddities around innodb_fatal_semaphore_wait_threshold and global.innodb_disallow_writes We will remove variable innodb_disallow_writes because it is badly designed and implemented. Parameter will be marked as removed. Instead we will be using * Galera provider is paused i.e. all commits will wait * FLUSH TABLES WITH READ LOCK (FTWRL) to avoid any DDL during SST, this global read lock i.e MDL_BACKUP_FTWRL1 will conflict MDL_BACKUP_DML taken by InnoDB background threads doing writes. Similarly, it will conflict with MBL_BACKUP_START used by mariabackup. * We force flushing all dirty pages from buffer pool and force InnoDB checkpoint * Encryption, purge, background statistics and FTS-optimize threads will acquire MDL_BACKUP_DML before continuing. This will conflict with lock acquired in FTWRL. Note that we will not use waiting. If MDL-lock can't be acquired we will skip the operation. handler.cc handler.h Add new API function ha_force_checkpoint to force checkpoint inside InnoDB. xtrabackup.cc Remove INNODB_DISALLOW_WRITES code mdl.cc New functions to trylock and release global MDL lock. wsrep_sst.cc Force flushing all dirty pages from buffer pool and force InnoDB checkpoint mysqld.cc Mark innodb-disallow-writes variable as removed. dict0stats.cc dict_stats_func Acquire backup lock and release it after we have done fil0crypt.cc fil_crypt_start_encrypting_space() fil_crypt_thread() Acquire backup lock and release it after we have done fts0opt.cc fts_optimize_sync_table() fts_optimize_callback() Acquire backup lock and release it after we have done ha_innodb.cc Remove all WITH_INNODB_DISALLOW_WRITES code wsrep_force_checkpoint() New API function to flush dirty pages from buffer pool and force full checkpoint. trx_purge,cc trx_purge() Acquire and release global MDL_BACKUP_DML lock try r --- sql/sql_class.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/sql_class.cc') diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 1ce59dc9348..5a1a1004ef5 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -1,6 +1,6 @@ /* Copyright (c) 2000, 2015, Oracle and/or its affiliates. - Copyright (c) 2008, 2021, MariaDB Corporation. + Copyright (c) 2008, 2022, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by -- cgit v1.2.1