mariadb/mysql-test/suite
Marko Mäkelä e8b7fceb82 MDEV-24302: RESET MASTER hangs
Starting with MariaDB 10.5, roughly after MDEV-23855 was fixed,
we are observing sporadic hangs during the execution of the
RESET MASTER statement. We are hoping to fix the hangs with these
changes, but due to the rather infrequent occurrence of the hangs
and our inability to reliably reproduce the hangs, we cannot be
sure of this.

What we do know is that innodb_force_recovery=2 (or a larger setting)
will prevent srv_master_callback (the former srv_master_thread) from
running. In that mode, periodic log flushes would never occur and
RESET MASTER could hang indefinitely. That is demonstrated by the new
test case that was developed by Andrei Elkin. We fix this case by
implementing a special case for it.

This also includes some code cleanup and renames of misleadingly
named code. The interface has nothing to do with log checkpoints in
the storage engine; it is only about requesting log writes to be
persistent.

handlerton::commit_checkpoint_request,
commit_checkpoint_notify_ha(): Remove the unused parameter hton.

log_requests.start: Replaces pending_checkpoint_list.
log_requests.end: Replaces pending_checkpoint_list_end.
log_requests.mutex: Replaces pending_checkpoint_mutex.

log_flush_notify_and_unlock(), log_flush_notify(): Replaces
innobase_mysql_log_notify().  The new implementation should be
functionally equivalent to the old one.

innodb_log_flush_request(): Replaces innobase_checkpoint_request().
Implement a fast path for common cases, and reduce the mutex hold time.
POSSIBLE FIX OF THE HANG: We will invoke commit_checkpoint_notify_ha()
for the current request if it is already satisfied, as well as invoke
log_flush_notify_and_unlock() for any satisfied requests.

log_write(): Invoke log_flush_notify() when the write is already durable.
This was missing WITH_PMEM when the log is in persistent memory.

Reviewed by: Vladislav Vaintroub
2021-03-29 15:16:23 +03:00
..
archive MDEV-18650: Options deprecated in previous versions - storage_engine 2020-02-13 13:42:01 +02:00
binlog Merge 10.4 into 10.5 2021-03-11 20:09:34 +02:00
binlog_encryption Merge 10.4 into 10.5 2021-03-11 20:09:34 +02:00
client A cleanup for MDEV-17088 Provide tools to encode/decode mysql-encoded file system names 2019-12-05 09:45:28 +04:00
compat Merge remote-tracking branch 'origin/10.4' into 10.5 2021-02-26 13:23:13 +11:00
csv Merge remote-tracking branch 'origin/10.4' into 10.5 2020-07-03 23:31:12 +03:00
encryption Merge 10.4 into 10.5 2021-03-11 20:09:34 +02:00
engines Merge 10.4 into 10.5 2021-03-20 13:34:38 +02:00
federated Merge 10.4 into 10.5 2021-01-25 12:44:24 +02:00
funcs_1 Fix various spelling errors still found in code 2021-03-22 18:10:39 +11:00
funcs_2 Merge 10.2 into 10.3 2020-07-02 06:17:51 +03:00
galera Merge 10.4 into 10.5 2021-03-27 17:37:42 +02:00
galera_3nodes Merge 10.4 into 10.5 2021-03-27 17:37:42 +02:00
galera_3nodes_sr Fix for galera_3nodes_sr/suite.pm () 2020-05-05 13:59:15 +03:00
galera_sr Disable crashing Galera tests: MDEV-18534, MDEV-24485 2021-03-19 13:10:12 +02:00
gcol Merge branch 'bb-10.4-release' into bb-10.5-release 2021-02-15 16:43:15 +01:00
handler Aria will now register it's transactions 2020-05-23 12:29:10 +03:00
heap test dropping of a MEMORY table 2020-07-04 01:44:46 +02:00
innodb MDEV-24302: RESET MASTER hangs 2021-03-29 15:16:23 +03:00
innodb_fts Merge 10.4 into 10.5 2021-03-11 20:09:34 +02:00
innodb_gis Merge branch '10.4' into 10.5 2021-02-23 13:06:22 +01:00
innodb_i_s MDEV-15053 Reduce buf_pool_t::mutex contention 2020-06-05 12:35:46 +03:00
innodb_zip MDEV-25265: ALTER TABLE...IMPORT TABLESPACE fails after DROP INDEX 2021-03-26 10:57:26 +02:00
jp Cleanup tests for MDEV-13049 Querying INFORMATION_SCHEMA becomes slow in MariaDB 10.1 2017-11-02 22:28:04 +04:00
json MDEV-19628 JSON with starting double quotes key is not valid. 2019-09-30 14:43:32 +04:00
large_tests MDEV-15253: Default optimizer setting changes for MariaDB 10.4 2018-12-09 09:22:00 +05:30
maria Merge branch 'bb-10.4-release' into bb-10.5-release 2021-02-15 16:43:15 +01:00
mariabackup Merge 10.4 into 10.5 2021-03-08 10:16:20 +02:00
mtr/t overlay support for mysql-test-run and mysqltest 2012-02-23 07:50:11 +01:00
mtr2 Fix for overlayed include files on Windows and a test case 2013-11-10 14:37:32 +04:00
multi_source Merge 10.4 into 10.5 2020-08-21 20:32:04 +03:00
optimizer_unfixed_bugs MDEV-18650: Options deprecated in previous versions - storage_engine 2020-02-13 13:42:01 +02:00
parts Fix various spelling errors still found in code 2021-03-22 18:10:39 +11:00
perfschema Merge branch 'bb-10.4-release' into bb-10.5-release 2021-02-15 16:43:15 +01:00
perfschema_stress P_S 5.7.28 2020-03-10 19:24:22 +01:00
period Merge 10.4 into 10.5 2020-11-13 21:54:21 +02:00
plugins Merge 10.4 into 10.5 2021-03-05 12:54:43 +02:00
roles Merge 10.4 into 10.5 2020-12-02 18:29:49 +02:00
rpl Fix various spelling errors still found in code 2021-03-22 18:10:39 +11:00
s3 MDEV-24366: s3 test postfix - use default for S3_BUCKET 2021-02-11 12:51:29 +11:00
sql_sequence Merge branch 'bb-10.4-release' into bb-10.5-release 2021-02-15 16:43:15 +01:00
storage_engine Merge 10.4 into 10.5 2020-08-21 20:32:04 +03:00
stress MDEV-22339 - Assertion `str_length < len' failed 2020-06-04 23:52:10 +02:00
sys_vars Merge 10.4 into 10.5 2021-03-27 17:37:42 +02:00
unit Fixed that unit.pcre_test works again. 2021-03-05 14:12:56 +02:00
vcol Merge 10.3 into 10.4 2020-11-03 14:49:17 +02:00
versioning Merge branch 'bb-10.4-release' into bb-10.5-release 2021-02-15 16:43:15 +01:00
wsrep Merge branch '10.4' into 10.5 2021-02-23 13:06:22 +01:00