diff options
author | unknown <tomas@poseidon.ndb.mysql.com> | 2004-09-25 16:06:30 +0000 |
---|---|---|
committer | unknown <tomas@poseidon.ndb.mysql.com> | 2004-09-25 16:06:30 +0000 |
commit | 7a2cb204ed0427d3e13c1fa4633cd62d97487f71 (patch) | |
tree | 452d2966b284653bb72bdfacfcdac9d6cddcc051 | |
parent | 1bf19b822d6248f32b7b9a02ef8cd9d404f058e6 (diff) | |
download | mariadb-git-7a2cb204ed0427d3e13c1fa4633cd62d97487f71.tar.gz |
added printout for where configuration is fetched
debug printouts
mysql-test/ndb/ndbcluster.sh:
.
ndb/include/mgmcommon/ConfigRetriever.hpp:
added printout for where configuration is fetched
ndb/src/common/mgmcommon/ConfigRetriever.cpp:
added printout for where configuration is fetched
ndb/src/kernel/main.cpp:
added printout for where configuration is fetched
ndb/src/kernel/vm/Configuration.cpp:
added printout for where configuration is fetched
ndb/src/kernel/vm/Configuration.hpp:
added printout for where configuration is fetched
ndb/src/ndbapi/Ndb.cpp:
debug printouts
-rw-r--r-- | mysql-test/ndb/ndbcluster.sh | 2 | ||||
-rw-r--r-- | ndb/include/mgmcommon/ConfigRetriever.hpp | 7 | ||||
-rw-r--r-- | ndb/src/common/mgmcommon/ConfigRetriever.cpp | 7 | ||||
-rw-r--r-- | ndb/src/kernel/main.cpp | 3 | ||||
-rw-r--r-- | ndb/src/kernel/vm/Configuration.cpp | 5 | ||||
-rw-r--r-- | ndb/src/kernel/vm/Configuration.hpp | 5 | ||||
-rw-r--r-- | ndb/src/ndbapi/Ndb.cpp | 10 |
7 files changed, 35 insertions, 4 deletions
diff --git a/mysql-test/ndb/ndbcluster.sh b/mysql-test/ndb/ndbcluster.sh index a1b6400d753..7485e42923e 100644 --- a/mysql-test/ndb/ndbcluster.sh +++ b/mysql-test/ndb/ndbcluster.sh @@ -45,7 +45,7 @@ status_ndb= ndb_diskless=0 ndb_no_ord=512 -ndb_con_op=10000 +ndb_con_op=105000 ndb_dmem=80M ndb_imem=24M diff --git a/ndb/include/mgmcommon/ConfigRetriever.hpp b/ndb/include/mgmcommon/ConfigRetriever.hpp index a584c394f45..938f4c19071 100644 --- a/ndb/include/mgmcommon/ConfigRetriever.hpp +++ b/ndb/include/mgmcommon/ConfigRetriever.hpp @@ -73,6 +73,9 @@ public: * Verify config */ bool verifyConfig(const struct ndb_mgm_configuration *, Uint32 nodeid); + + Uint32 get_mgmd_port() const {return m_mgmd_port;}; + const char *get_mgmd_host() const {return m_mgmd_host;}; private: BaseString errorString; enum ErrorType { @@ -85,7 +88,9 @@ private: struct LocalConfig& _localConfig; Uint32 _ownNodeId; - + Uint32 m_mgmd_port; + const char *m_mgmd_host; + Uint32 m_version; Uint32 m_node_type; NdbMgmHandle m_handle; diff --git a/ndb/src/common/mgmcommon/ConfigRetriever.cpp b/ndb/src/common/mgmcommon/ConfigRetriever.cpp index 44b41956d33..c4957ffdbf1 100644 --- a/ndb/src/common/mgmcommon/ConfigRetriever.cpp +++ b/ndb/src/common/mgmcommon/ConfigRetriever.cpp @@ -74,6 +74,9 @@ ConfigRetriever::init() { int ConfigRetriever::do_connect(int exit_on_connect_failure){ + m_mgmd_port= 0; + m_mgmd_host= 0; + if(!m_handle) m_handle= ndb_mgm_create_handle(); @@ -94,6 +97,8 @@ ConfigRetriever::do_connect(int exit_on_connect_failure){ case MgmId_TCP: tmp.assfmt("%s:%d", m->name.c_str(), m->port); if (ndb_mgm_connect(m_handle, tmp.c_str()) == 0) { + m_mgmd_port= m->port; + m_mgmd_host= m->name.c_str(); return 0; } setError(CR_RETRY, ndb_mgm_get_latest_error_desc(m_handle)); @@ -118,6 +123,8 @@ ConfigRetriever::do_connect(int exit_on_connect_failure){ ndb_mgm_destroy_handle(&m_handle); m_handle= 0; + m_mgmd_port= 0; + m_mgmd_host= 0; return -1; } diff --git a/ndb/src/kernel/main.cpp b/ndb/src/kernel/main.cpp index 035dfff8d01..9c25da79065 100644 --- a/ndb/src/kernel/main.cpp +++ b/ndb/src/kernel/main.cpp @@ -252,6 +252,9 @@ systemInfo(const Configuration & config, const LogLevel & logLevel){ if(logLevel.getLogLevel(LogLevel::llStartUp) > 0){ g_eventLogger.info("NDB Cluster -- DB node %d", globalData.ownId); g_eventLogger.info("%s --", NDB_VERSION_STRING); + if (config.get_mgmd_host()) + g_eventLogger.info("Configuration fetched at %s port %d", + config.get_mgmd_host(), config.get_mgmd_port()); #ifdef NDB_SOLARIS // ok g_eventLogger.info("NDB is running on a machine with %d processor(s) at %d MHz", processor, speed); diff --git a/ndb/src/kernel/vm/Configuration.cpp b/ndb/src/kernel/vm/Configuration.cpp index 0c4e24129df..600e6f67910 100644 --- a/ndb/src/kernel/vm/Configuration.cpp +++ b/ndb/src/kernel/vm/Configuration.cpp @@ -193,6 +193,8 @@ Configuration::fetch_configuration(LocalConfig &local_config){ delete m_config_retriever; } + m_mgmd_port= 0; + m_mgmd_host= 0; m_config_retriever= new ConfigRetriever(local_config, NDB_VERSION, NODE_TYPE_DB); if(m_config_retriever->init() == -1 || m_config_retriever->do_connect() == -1){ @@ -207,6 +209,9 @@ Configuration::fetch_configuration(LocalConfig &local_config){ ERROR_SET(fatal, ERR_INVALID_CONFIG, "Could connect to ndb_mgmd", s); } + m_mgmd_port= m_config_retriever->get_mgmd_port(); + m_mgmd_host= m_config_retriever->get_mgmd_host(); + ConfigRetriever &cr= *m_config_retriever; if((globalData.ownId = cr.allocNodeId()) == 0){ diff --git a/ndb/src/kernel/vm/Configuration.hpp b/ndb/src/kernel/vm/Configuration.hpp index 7ac171c4a70..2ea32ffea37 100644 --- a/ndb/src/kernel/vm/Configuration.hpp +++ b/ndb/src/kernel/vm/Configuration.hpp @@ -67,6 +67,9 @@ public: const ndb_mgm_configuration_iterator * getOwnConfigIterator() const; + Uint32 get_mgmd_port() const {return m_mgmd_port;}; + const char *get_mgmd_host() const {return m_mgmd_host;}; + class LogLevel * m_logLevel; private: friend class Cmvmi; @@ -95,6 +98,8 @@ private: char * _backupPath; bool _initialStart; char * _connectString; + Uint32 m_mgmd_port; + const char *m_mgmd_host; bool _daemonMode; void calcSizeAlt(class ConfigValues * ); diff --git a/ndb/src/ndbapi/Ndb.cpp b/ndb/src/ndbapi/Ndb.cpp index 7312eafb2f5..cb126a221a8 100644 --- a/ndb/src/ndbapi/Ndb.cpp +++ b/ndb/src/ndbapi/Ndb.cpp @@ -327,7 +327,11 @@ Ndb::startTransaction(Uint32 aPriority, const char * keyData, Uint32 keyLen) } else { nodeId = 0; }//if - DBUG_RETURN(startTransactionLocal(aPriority, nodeId)); + { + NdbConnection *trans= startTransactionLocal(aPriority, nodeId); + DBUG_PRINT("exit",("start trans= 0x%x", trans)); + DBUG_RETURN(trans); + } } else { DBUG_RETURN(NULL); }//if @@ -451,7 +455,7 @@ Ndb::startTransactionLocal(Uint32 aPriority, Uint32 nodeId) abort(); } #endif - DBUG_PRINT("exit", ("transaction id: %d", tConnection->getTransactionId())); + DBUG_PRINT("exit", ("transid= %lld", tConnection->getTransactionId())); DBUG_RETURN(tConnection); }//Ndb::startTransactionLocal() @@ -465,6 +469,8 @@ void Ndb::closeTransaction(NdbConnection* aConnection) { DBUG_ENTER("Ndb::closeTransaction"); + DBUG_PRINT("enter",("close trans= 0x%x, transid= %lld", + aConnection, aConnection->getTransactionId())); NdbConnection* tCon; NdbConnection* tPreviousCon; |