From 07627827e9c06fbd2a38262fc66d23756a1a1eac Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 22 Mar 2006 10:17:29 +0100 Subject: [PATCH 1/5] added config parameter InitialNoOfOpenFiles --- mysql-test/ndb/ndb_config_2_node.ini | 3 +++ storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp | 6 ++++-- storage/ndb/src/mgmsrv/ConfigInfo.cpp | 12 ++++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/mysql-test/ndb/ndb_config_2_node.ini b/mysql-test/ndb/ndb_config_2_node.ini index e7a12dbde77..26ed928a7cf 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 138b519631c..46324ff4373 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, &m_maxFiles); + 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 214a3b41e62..4bd64d98a7f 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_MAX_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", From 76313a555cc15e73909292ccde77b519f892b6a1 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 22 Mar 2006 10:54:55 +0100 Subject: [PATCH 2/5] corrected previous patch --- storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp | 2 +- storage/ndb/src/mgmsrv/ConfigInfo.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp b/storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp index 46324ff4373..da2efab5792 100644 --- a/storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp +++ b/storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp @@ -109,7 +109,7 @@ 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, &m_maxFiles); + ndb_mgm_get_int_parameter(p, CFG_DB_INITIAL_OPEN_FILES, &noIdleFiles); if (noIdleFiles > m_maxFiles) m_maxFiles = noIdleFiles; // Create idle AsyncFiles diff --git a/storage/ndb/src/mgmsrv/ConfigInfo.cpp b/storage/ndb/src/mgmsrv/ConfigInfo.cpp index 4bd64d98a7f..5b3efa28d35 100644 --- a/storage/ndb/src/mgmsrv/ConfigInfo.cpp +++ b/storage/ndb/src/mgmsrv/ConfigInfo.cpp @@ -893,7 +893,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { STR_VALUE(MAX_INT_RNIL) }, { - CFG_DB_MAX_OPEN_FILES, + CFG_DB_INITIAL_OPEN_FILES, "InitialNoOfOpenFiles", DB_TOKEN, "Initial number of files open per "DB_TOKEN_PRINT" node.(One thread is created per file)", From 104f2c0c99295b0dc23a097c0b5c294c9ce94c97 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 22 Mar 2006 11:45:14 +0100 Subject: [PATCH 3/5] ha_partition should skip ndb specific flags used by sql apply thread to signal idempotency behaviour --- sql/ha_partition.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index b6dceb8f690..0a8f92d6813 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -4709,6 +4709,15 @@ int ha_partition::extra(enum ha_extra_function operation) m_extra_cache_size= 0; DBUG_RETURN(loop_extra(operation)); } + case HA_EXTRA_IGNORE_NO_KEY: + case HA_EXTRA_NO_IGNORE_NO_KEY: + { + /* + Ignore as these are specific to NDB for handling + idempotency + */ + break; + } default: { /* Temporary crash to discover what is wrong */ From d410ef5865d4d352e29560bdb26e7fcb425bbba5 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 22 Mar 2006 15:56:53 +0100 Subject: [PATCH 4/5] continued: ha_partition should skip ndb specific flags used by sql apply thread to signal idempotency behaviour --- include/my_base.h | 2 ++ mysql-test/t/disabled.def | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/my_base.h b/include/my_base.h index a704ff1b6ab..b9a806cc02f 100644 --- a/include/my_base.h +++ b/include/my_base.h @@ -159,6 +159,8 @@ enum ha_extra_function { Ignore if the a tuple is not found, continue processing the transaction and ignore that 'row'. Needed for idempotency handling on the slave + + Currently only used by NDB storage engine. Partition handler ignores flag. */ HA_EXTRA_IGNORE_NO_KEY, HA_EXTRA_NO_IGNORE_NO_KEY, diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index 91f8c986cc4..1ab333eb37b 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -23,8 +23,8 @@ partition_03ndb : Bug#16385 ps_7ndb : dbug assert in RBR mode when executing test suite #rpl_bit_npk : Bug#13418 rpl_ddl : Bug#15963 SBR does not show "Definer" correctly -rpl_ndb_2innodb : Assert failure in ha_partition::extra() -rpl_ndb_2myisam : Assert failure in ha_partition::extra() +rpl_ndb_2innodb : If removed fails later on assertion in get_parts_for_update() +rpl_ndb_2myisam : If removed fails later on assertion in get_parts_for_update() rpl_ndb_auto_inc : Bug#17086 #rpl_ndb_basic : Bug#16228 [IN REVIEW] rpl_ndb_blob : interferes with following tests, causing hang From 5c207e336d9fdd3b3842dfbb52d298a38a0e9ab9 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 22 Mar 2006 16:04:38 +0100 Subject: [PATCH 5/5] changed comment in disabled.def --- mysql-test/t/disabled.def | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index 1ab333eb37b..aeb94dbfcc5 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -23,8 +23,8 @@ partition_03ndb : Bug#16385 ps_7ndb : dbug assert in RBR mode when executing test suite #rpl_bit_npk : Bug#13418 rpl_ddl : Bug#15963 SBR does not show "Definer" correctly -rpl_ndb_2innodb : If removed fails later on assertion in get_parts_for_update() -rpl_ndb_2myisam : If removed fails later on assertion in get_parts_for_update() +rpl_ndb_2innodb : assertion in get_parts_for_update() +rpl_ndb_2myisam : assertion in get_parts_for_update() rpl_ndb_auto_inc : Bug#17086 #rpl_ndb_basic : Bug#16228 [IN REVIEW] rpl_ndb_blob : interferes with following tests, causing hang