Skip to content

Commit a3e1afa

Browse files
committed
Merge branch 'mysql-5.7-cluster-7.6' into mysql-8.0
Change-Id: I69c5572ca5918e9aed8b9472d98e18ce39f27176
2 parents 2fb8c7d + 716fe86 commit a3e1afa

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

storage/ndb/src/common/transporter/TransporterRegistry.cpp

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,13 +367,25 @@ void TransporterRegistry::reset_total_spintime() const
367367
receiveHandle->m_total_spintime = 0;
368368
}
369369

370+
/**
371+
* Time limit for individual MGMAPI activities, including
372+
* TCP connection
373+
* Handshake, auth, TLS
374+
* MGMAPI command responses (except where overridden)
375+
* Affects:
376+
* - TR MGMAPI connection used to manage dynamic ports
377+
* - Transporter-to-MGMD MGMAPI connections converted
378+
* to transporters
379+
*/
380+
static const Uint32 MGM_TIMEOUT_MILLIS=5000;
381+
370382
void TransporterRegistry::set_mgm_handle(NdbMgmHandle h)
371383
{
372384
DBUG_ENTER("TransporterRegistry::set_mgm_handle");
373385
if (m_mgm_handle)
374386
ndb_mgm_destroy_handle(&m_mgm_handle);
375387
m_mgm_handle= h;
376-
ndb_mgm_set_timeout(m_mgm_handle, 5000);
388+
ndb_mgm_set_timeout(m_mgm_handle, MGM_TIMEOUT_MILLIS);
377389
#ifndef NDEBUG
378390
if (h)
379391
{
@@ -3821,6 +3833,11 @@ TransporterRegistry::connect_ndb_mgmd(const char* server_name,
38213833
ndb_mgm_set_connectstring(h, cs.c_str());
38223834
}
38233835

3836+
/**
3837+
* Set timeout
3838+
*/
3839+
ndb_mgm_set_timeout(h, MGM_TIMEOUT_MILLIS);
3840+
38243841
if(ndb_mgm_connect(h, 0, 0, 0)<0)
38253842
{
38263843
DBUG_PRINT("info", ("connection to mgmd failed"));

0 commit comments

Comments
 (0)