1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

MDEV-33671: Remove hardcoded open-files-limit in safe_process.cc

The fixed limit of 1024 open files was preventing proper concurrency
testing in MTR. This commit removes the hardcoded value and adds a new
option to control the limit when running tests: --open-files-limit=X.

The default is still 1024, but it can now be changed when needed,
making it easier to test scenarios that require different number of
open file descriptors at the same time e.g: partition_notwin.test

Documentation is added to mtr's help file as well.

Signed-off-by: Vicențiu Ciorbaru <vicentiu@mariadb.org>
This commit is contained in:
Mohanad
2025-03-29 20:36:08 +02:00
committed by Vicențiu-Marian Ciorbaru
parent a524ec5951
commit 1f5d2b2010
3 changed files with 20 additions and 6 deletions

View File

@ -138,6 +138,7 @@ sub new {
my $error = delete($opts{'error'});
my $verbose = delete($opts{'verbose'}) || $::opt_verbose;
my $nocore = delete($opts{'nocore'});
my $open_files_limit = delete($opts{'open_files_limit'});
my $host = delete($opts{'host'});
my $shutdown = delete($opts{'shutdown'});
my $user_data= delete($opts{'user_data'});
@ -161,6 +162,8 @@ sub new {
push(@safe_args, "--verbose") if $verbose > 0;
push(@safe_args, "--nocore") if $nocore;
push(@safe_args, "--open-files-limit=$open_files_limit") if $open_files_limit;
# Point the safe_process at the right parent if running on cygwin
push(@safe_args, "--parent-pid=".Cygwin::pid_to_winpid($$)) if IS_CYGWIN;