Commit 461dab23 authored by unknown's avatar unknown

added mutex lock for "get config"


ndb/include/transporter/TransporterRegistry.hpp:
  added comment
parent ccdb4f66
...@@ -101,6 +101,11 @@ public: ...@@ -101,6 +101,11 @@ public:
unsigned maxTransporters = MAX_NTRANSPORTERS, unsigned maxTransporters = MAX_NTRANSPORTERS,
unsigned sizeOfLongSignalMemory = 100); unsigned sizeOfLongSignalMemory = 100);
/**
* this handle will be used in the client connect thread
* to fetch information on dynamic ports. The old handle
* id destroyed, and this is destroyed by the destructor
*/
void set_mgm_handle(NdbMgmHandle h); void set_mgm_handle(NdbMgmHandle h);
NdbMgmHandle get_mgm_handle(void) { return m_mgm_handle; }; NdbMgmHandle get_mgm_handle(void) { return m_mgm_handle; };
......
...@@ -572,11 +572,13 @@ MgmApiSession::getConfig_common(Parser_t::Context &, ...@@ -572,11 +572,13 @@ MgmApiSession::getConfig_common(Parser_t::Context &,
} }
} }
NdbMutex_Lock(m_mgmsrv.m_configMutex);
const ConfigValues * cfg = &conf->m_configValues->m_config; const ConfigValues * cfg = &conf->m_configValues->m_config;
const Uint32 size = cfg->getPackedSize(); const Uint32 size = cfg->getPackedSize();
UtilBuffer src; UtilBuffer src;
cfg->pack(src); cfg->pack(src);
NdbMutex_Unlock(m_mgmsrv.m_configMutex);
BaseString str; BaseString str;
int res = base64_encode(src, str); int res = base64_encode(src, str);
......
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