diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-09-30 10:01:10 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-09-30 10:01:10 +0300 |
commit | be803f037f98812410f24b67af61aa7857969dcf (patch) | |
tree | 8c57a81790acc772d079a211eaffca2d8e1cdfbb /mysql-test | |
parent | 064cb58efea063595e336e4cd0feccb12d26f8cf (diff) | |
download | mariadb-git-be803f037f98812410f24b67af61aa7857969dcf.tar.gz |
MDEV-25215 Excessive logging "InnoDB: Cannot close file"
In commit 45ed9dd957eebc7fc84feb2509f4aa6baa908a95 (MDEV-23855)
when removing fil_system.LRU we failed to rate-limit the output
for reporting violations of innodb_open_files or open_files_limit.
If the server is run with a small limit of open files that is
well below the number of .ibd files that are being accessed by
the workload, and if at the same time innodb_log_file_size is
very small so that log checkpoints will occur frequently,
the process of enforcing the open files limit may be run very often.
fil_space_t::try_to_close(): Display at most one message per call,
and only if at least 5 seconds have elapsed since the last time a
message was output.
fil_node_open_file(): Only output a summary message if
fil_space_t::try_to_close() displayed a message during this run.
(Note: multiple threads may execute fil_node_open_file() on
different files at the same time.)
fil_space_t::get(): Do not dereference a null pointer if n & STOPPING.
This was caught by the test case below.
Unfortunately, it is not possible to create a fully deterministic
test case (expecting exactly 1 message to be emitted). The following with
--innodb-open-files=10 --innodb-log-file-size=4m
would occasionally fail to find the message in the log:
--source include/have_innodb.inc
--source include/have_partition.inc
--source include/have_sequence.inc
call mtr.add_suppression("InnoDB: innodb_open_files=10 is exceeded");
CREATE TABLE t1 (pk INT AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB
PARTITION BY key (pk) PARTITIONS 100;
INSERT INTO t1 SELECT * FROM seq_1_to_100;
--disable_query_log
let $n=400;
while ($n)
{
BEGIN; DELETE FROM t1; ROLLBACK;
dec $n;
}
--enable_query_log
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
let SEARCH_PATTERN= \[Note\] InnoDB: Cannot close file;
-- source include/search_pattern_in_file.inc
DROP TABLE t1;
Diffstat (limited to 'mysql-test')
0 files changed, 0 insertions, 0 deletions