diff --git a/mysql-test/ndb/ndb_config_2_node.ini b/mysql-test/ndb/ndb_config_2_node.ini index e7a12dbde77485eb4dda239e16ceb7966f313dcb..26ed928a7cfcf92a14492776e4ee3dfbef80a53f 100644 --- a/mysql-test/ndb/ndb_config_2_node.ini +++ b/mysql-test/ndb/ndb_config_2_node.ini @@ -12,6 +12,9 @@ MaxNoOfAttributes= CHOOSE_MaxNoOfAttributes TimeBetweenGlobalCheckpoints= 500 NoOfFragmentLogFiles= 3 DiskPageBufferMemory= CHOOSE_DiskPageBufferMemory +# the following parametes just function as a small regression +# test that the parameter exists +InitialNoOfOpenFiles= 27 [ndbd] HostName= CHOOSE_HOSTNAME_1 # hostname is a valid network adress diff --git a/storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp b/storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp index 138b519631c152c3603f3a5ef974c5ffa704a2d2..da2efab5792a213b8ba868ead740af1033aabb67 100644 --- a/storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp +++ b/storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp @@ -108,9 +108,11 @@ Ndbfs::execREAD_CONFIG_REQ(Signal* signal) m_maxFiles = 40; ndb_mgm_get_int_parameter(p, CFG_DB_MAX_OPEN_FILES, &m_maxFiles); - + Uint32 noIdleFiles = 27; + ndb_mgm_get_int_parameter(p, CFG_DB_INITIAL_OPEN_FILES, &noIdleFiles); + if (noIdleFiles > m_maxFiles) + m_maxFiles = noIdleFiles; // Create idle AsyncFiles - Uint32 noIdleFiles = m_maxFiles > 27 ? 27 : m_maxFiles ; for (Uint32 i = 0; i < noIdleFiles; i++){ theIdleFiles.push_back(createAsyncFile()); } diff --git a/storage/ndb/src/mgmsrv/ConfigInfo.cpp b/storage/ndb/src/mgmsrv/ConfigInfo.cpp index 214a3b41e62b53c1ae55477131e41dcb1a4e42ab..5b3efa28d350f5e3b619557bc44080360d86c8fe 100644 --- a/storage/ndb/src/mgmsrv/ConfigInfo.cpp +++ b/storage/ndb/src/mgmsrv/ConfigInfo.cpp @@ -892,6 +892,18 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { "20", STR_VALUE(MAX_INT_RNIL) }, + { + CFG_DB_INITIAL_OPEN_FILES, + "InitialNoOfOpenFiles", + DB_TOKEN, + "Initial number of files open per "DB_TOKEN_PRINT" node.(One thread is created per file)", + ConfigInfo::CI_USED, + false, + ConfigInfo::CI_INT, + "27", + "20", + STR_VALUE(MAX_INT_RNIL) }, + { CFG_DB_TRANSACTION_CHECK_INTERVAL, "TimeBetweenInactiveTransactionAbortCheck",