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
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
compat Merge remote-tracking branch 'origin/10.4' into 10.5 2021-02-26 13:23:13 +11:00
csv
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
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
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
heap
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
innodb_zip MDEV-25265: ALTER TABLE...IMPORT TABLESPACE fails after DROP INDEX 2021-03-26 10:57:26 +02:00
jp
json
large_tests
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
mtr2
multi_source
optimizer_unfixed_bugs
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
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
stress
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