mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
added printout for where configuration is fetched
debug printouts
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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){
|
||||
|
||||
@@ -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 * );
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user