summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-04-06 08:06:49 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2022-04-06 08:06:49 +0300
commite9735a81859f172b73f75eccc043540a58d91cbc (patch)
tree9d37a99749581b4baff7fdaec0f0869c02d87495 /extra
parent7c584d8270cf192496f36e993e7759616f3b650b (diff)
downloadmariadb-git-e9735a81859f172b73f75eccc043540a58d91cbc.tar.gz
MDEV-25975 innodb_disallow_writes causes shutdown to hang
We will remove the parameter innodb_disallow_writes because it is badly designed and implemented. The parameter was never allowed at startup. It was only internally used by Galera snapshot transfer. If a user executed SET GLOBAL innodb_disallow_writes=ON; the server could hang even on subsequent read operations. During Galera snapshot transfer, we will block writes to implement an rsync friendly snapshot, as follows: sst_flush_tables() will acquire a global lock by executing FLUSH TABLES WITH READ LOCK, which will block any writes at the high level. sst_disable_innodb_writes(), invoked via ha_disable_internal_writes(true), will suspend or disable InnoDB background tasks or threads that could initiate writes. As part of this, log_make_checkpoint() will be invoked to ensure that anything in the InnoDB buf_pool.flush_list will be written to the data files. This has the nice side effect that the Galera joiner will avoid crash recovery. The changes to sql/wsrep.cc and to the tests are based on a prototype that was developed by Jan Lindström. Reviewed by: Jan Lindström
Diffstat (limited to 'extra')
-rw-r--r--extra/mariabackup/xtrabackup.cc12
1 files changed, 0 insertions, 12 deletions
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc
index 70542a35514..41461d6ece1 100644
--- a/extra/mariabackup/xtrabackup.cc
+++ b/extra/mariabackup/xtrabackup.cc
@@ -4372,11 +4372,6 @@ fail:
crc_init();
recv_sys_init();
-#ifdef WITH_INNODB_DISALLOW_WRITES
- srv_allow_writes_event = os_event_create(0);
- os_event_set(srv_allow_writes_event);
-#endif
-
xb_filters_init();
xb_fil_io_init();
@@ -5837,10 +5832,6 @@ static bool xtrabackup_prepare_func(char** argv)
log_sys.create();
recv_recovery_on = true;
-#ifdef WITH_INNODB_DISALLOW_WRITES
- srv_allow_writes_event = os_event_create(0);
- os_event_set(srv_allow_writes_event);
-#endif
dberr_t err = xb_data_files_init();
if (err != DB_SUCCESS) {
msg("mariabackup: error: xb_data_files_init() failed "
@@ -5862,9 +5853,6 @@ static bool xtrabackup_prepare_func(char** argv)
xb_filter_hash_free(inc_dir_tables_hash);
fil_system.close();
-#ifdef WITH_INNODB_DISALLOW_WRITES
- os_event_destroy(srv_allow_writes_event);
-#endif
innodb_free_param();
log_sys.close();
sync_check_close();