Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.5, 10.6, 10.11, 11.0(EOL), 11.1(EOL), 11.2(EOL), 11.3(EOL), 11.4, 11.5(EOL)
Description
The mariadbd instances that are spawned by MTR have their RLIMIT_NOFILE hardcoded to 1024. This makes MTR unusable if used for high concurrency testing (e.g. for benchmarking).
The hardcoding is set in ./mysql-test/lib/My/SafeProcess/safe_process.cc in its main function:
/*
|
mysqld defaults depend on that. make test results stable and independent
|
from the environment
|
*/
|
setlimit(RLIMIT_NOFILE, 1024, 1024);
|
Instead, the safe process executable should use the test's configuration and use its value for open_files_limit.
Hi all, this is my first time trying to do some contribution to this community. I saw this task is labelled "beginner-friendly" so that I wanna give it a try.
Here's what I am thinking about the fix :
Currently to run this program, user doesn't need to provide a soft/hard limit in the command line, because the soft/hard limit is hardcoded to 1024. To fix the issue, we need to give the user an option to pass in two additional arguments (i.e. soft/hard limit) when they invoke the program, then get those 2 arguments in the /parse arguments/ section, then pass them to the setlimit() function. If the user didn't provide soft/hard limit, just default them to 1024.
Is my understand correct? If this is confirmed I'll start working on it when I get up. Thank you!