Skip to content

Commit 2b83215

Browse files
committed
MDEV-23787 mtr --rr fixes
1. rr record -h randomizes number of processors. Disable THREAD_POOL_SIZE check. 2. check for kernel.perf_event_paranoid for user-friendly error message.
1 parent 5933081 commit 2b83215

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

mysql-test/include/mtr_check.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ BEGIN
3535
AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP'
3636
AND variable_name not like 'GTID%POS'
3737
AND variable_name != 'GTID_BINLOG_STATE'
38+
AND variable_name != 'THREAD_POOL_SIZE'
3839
ORDER BY variable_name;
3940

4041
-- Dump all databases, there should be none

mysql-test/mysql-test-run.pl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1820,6 +1820,16 @@ sub command_line_setup {
18201820
$opt_shutdown_timeout= 24 * 60;
18211821
# One day for PID file creation (this is given in seconds not minutes)
18221822
$opt_start_timeout= 24 * 60 * 60;
1823+
if ($opt_rr && open(my $fh, '<', '/proc/sys/kernel/perf_event_paranoid'))
1824+
{
1825+
my $perf_event_paranoid= <$fh>;
1826+
close $fh;
1827+
chomp $perf_event_paranoid;
1828+
if ($perf_event_paranoid == 0)
1829+
{
1830+
mtr_error("rr requires kernel.perf_event_paranoid set to 1");
1831+
}
1832+
}
18231833
}
18241834

18251835
# --------------------------------------------------------------------------

0 commit comments

Comments
 (0)