diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-04-06 08:06:49 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-04-06 08:06:49 +0300 |
commit | e9735a81859f172b73f75eccc043540a58d91cbc (patch) | |
tree | 9d37a99749581b4baff7fdaec0f0869c02d87495 /mysql-test/suite/galera/r/galera_var_innodb_disallow_writes.result | |
parent | 7c584d8270cf192496f36e993e7759616f3b650b (diff) | |
download | mariadb-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 'mysql-test/suite/galera/r/galera_var_innodb_disallow_writes.result')
-rw-r--r-- | mysql-test/suite/galera/r/galera_var_innodb_disallow_writes.result | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/mysql-test/suite/galera/r/galera_var_innodb_disallow_writes.result b/mysql-test/suite/galera/r/galera_var_innodb_disallow_writes.result deleted file mode 100644 index 8750651612d..00000000000 --- a/mysql-test/suite/galera/r/galera_var_innodb_disallow_writes.result +++ /dev/null @@ -1,28 +0,0 @@ -connection node_1a; -SET SESSION wsrep_sync_wait = 0; -connection node_1; -CREATE TABLE t1 (f1 INTEGER, f2 varchar(1024)) Engine=InnoDB; -CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB; -INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); -SET GLOBAL innodb_disallow_writes=ON; -INSERT INTO t1 (f2) SELECT 'abcde ' FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;; -connection node_2; -INSERT INTO t1 (f2) SELECT 'fghij ' FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4; -SELECT COUNT(*) AS EXPECT_10000 FROM t1; -EXPECT_10000 -10000 -connection node_1a; -SET GLOBAL innodb_disallow_writes=OFF; -connection node_1; -SELECT COUNT(*) AS EXPECT_20000 FROM t1; -EXPECT_20000 -20000 -connection node_2; -SELECT COUNT(*) AS EXPECT_20000 FROM t1; -EXPECT_20000 -20000 -connection node_1; -connection node_2; -DROP TABLE t1; -DROP TABLE ten; -disconnect node_1a; |