Commit 18f10e35 authored by unknown's avatar unknown

Bug#24521, ndbd node crashes if try to create many datafiles for tablespace


storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp:
  change MaxNoOfOpenFiles's default value to 0, that means no max openning files limitation 
  in ndbfs when user doesnot set explicitly the value in config.ini;
  Meanwhile, if user set a specific value of MaxNoOfOpenFile and hit the max limiation, he 
  deserves the result.
storage/ndb/src/mgmsrv/ConfigInfo.cpp:
  change default to 0
storage/ndb/src/mgmsrv/ParamInfo.cpp:
  change default to 0
parent 774a1955
...@@ -105,11 +105,11 @@ Ndbfs::execREAD_CONFIG_REQ(Signal* signal) ...@@ -105,11 +105,11 @@ Ndbfs::execREAD_CONFIG_REQ(Signal* signal)
theRequestPool = new Pool<Request>; theRequestPool = new Pool<Request>;
m_maxFiles = 40; m_maxFiles = 0;
ndb_mgm_get_int_parameter(p, CFG_DB_MAX_OPEN_FILES, &m_maxFiles); ndb_mgm_get_int_parameter(p, CFG_DB_MAX_OPEN_FILES, &m_maxFiles);
Uint32 noIdleFiles = 27; Uint32 noIdleFiles = 27;
ndb_mgm_get_int_parameter(p, CFG_DB_INITIAL_OPEN_FILES, &noIdleFiles); ndb_mgm_get_int_parameter(p, CFG_DB_INITIAL_OPEN_FILES, &noIdleFiles);
if (noIdleFiles > m_maxFiles) if (noIdleFiles > m_maxFiles && m_maxFiles != 0)
m_maxFiles = noIdleFiles; m_maxFiles = noIdleFiles;
// Create idle AsyncFiles // Create idle AsyncFiles
for (Uint32 i = 0; i < noIdleFiles; i++){ for (Uint32 i = 0; i < noIdleFiles; i++){
...@@ -650,7 +650,7 @@ AsyncFile* ...@@ -650,7 +650,7 @@ AsyncFile*
Ndbfs::createAsyncFile(){ Ndbfs::createAsyncFile(){
// Check limit of open files // Check limit of open files
if (theFiles.size()+1 == m_maxFiles) { if (m_maxFiles !=0 && theFiles.size()+1 == m_maxFiles) {
// Print info about all open files // Print info about all open files
for (unsigned i = 0; i < theFiles.size(); i++){ for (unsigned i = 0; i < theFiles.size(); i++){
AsyncFile* file = theFiles[i]; AsyncFile* file = theFiles[i];
......
...@@ -879,7 +879,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -879,7 +879,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::CI_USED, ConfigInfo::CI_USED,
false, false,
ConfigInfo::CI_INT, ConfigInfo::CI_INT,
"40", "0",
"20", "20",
STR_VALUE(MAX_INT_RNIL) }, STR_VALUE(MAX_INT_RNIL) },
......
...@@ -705,7 +705,7 @@ const ParamInfo ParamInfoArray[] = { ...@@ -705,7 +705,7 @@ const ParamInfo ParamInfoArray[] = {
CI_USED, CI_USED,
false, false,
CI_INT, CI_INT,
"40", "0",
"20", "20",
STR_VALUE(MAX_INT_RNIL) }, STR_VALUE(MAX_INT_RNIL) },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment