4551 Jonas Oreland 2011-09-26 [merge]
ndb - merge 7.0.27 into 7.0-main
modified:
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
storage/ndb/src/mgmsrv/MgmtSrvr.cpp
4550 Jonas Oreland 2011-09-23
ndb
- add config part (still only explicit, using ThreadConfig)
of MT-TC
- remove ThreadConfig-printout from ndbd (single threaded)
modified:
storage/ndb/src/kernel/SimBlockList.cpp
storage/ndb/src/kernel/ndbd.cpp
storage/ndb/src/kernel/vm/Configuration.cpp
storage/ndb/src/kernel/vm/mt_thr_config.cpp
storage/ndb/src/kernel/vm/mt_thr_config.hpp
=== modified file 'storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp 2011-09-23 07:47:41 +0000
+++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp 2011-09-26 07:58:35 +0000
@@ -11348,8 +11348,8 @@ void Dblqh::scanTupkeyRefLab(Signal* sig
scanReleaseLocksLab(signal);
return;
}//if
- Uint32 time_passed= tcConnectptr.p->tcTimer - cLqhTimeOutCount;
- if (rows)
+ Uint32 time_passed= cLqhTimeOutCount - tcConnectptr.p->tcTimer;
+ if (rows)
{
if (time_passed > 1)
{
=== modified file 'storage/ndb/src/mgmsrv/MgmtSrvr.cpp'
--- a/storage/ndb/src/mgmsrv/MgmtSrvr.cpp 2011-09-19 14:10:19 +0000
+++ b/storage/ndb/src/mgmsrv/MgmtSrvr.cpp 2011-09-23 17:19:24 +0000
@@ -3451,15 +3451,17 @@ MgmtSrvr::try_alloc_from_list(NodeId& no
for (unsigned i = 0; i < nodes.size(); i++)
{
const unsigned id= nodes[i].id;
- if (m_reserved_nodes.get(id))
+ if (theFacade->ext_isConnected(id))
{
- // Node is already reserved(locally in this node)
+ // Node is already reserved(connected via transporter)
continue;
}
- if (theFacade->ext_isConnected(id))
+ NdbMutex_Lock(m_reserved_nodes_mutex);
+ if (m_reserved_nodes.get(id))
{
- // Node is already reserved(connected via transporter)
+ // Node is already reserved(locally in this node)
+ NdbMutex_Unlock(m_reserved_nodes_mutex);
continue;
}
@@ -3483,16 +3485,14 @@ MgmtSrvr::try_alloc_from_list(NodeId& no
more than one thread asked for same nodeid) since it's
now reserved in data node
*/
- m_reserved_nodes.clear(id);
+ release_local_nodeid_reservation(id);
}
- NdbMutex_Lock(m_reserved_nodes_mutex);
return true;
}
/* Release the local reservation */
- m_reserved_nodes.clear(id);
- NdbMutex_Lock(m_reserved_nodes_mutex);
+ release_local_nodeid_reservation(id);
if (res < 0)
{
@@ -3601,8 +3601,6 @@ MgmtSrvr::alloc_node_id_impl(NodeId& nod
return false;
}
- Guard g(m_reserved_nodes_mutex);
-
/* Check timeout of nodeid reservations for NDB */
if (type == NDB_MGM_NODE_TYPE_NDB)
{
@@ -3610,8 +3608,11 @@ MgmtSrvr::alloc_node_id_impl(NodeId& nod
for (unsigned i = 0; i < nodes.size(); i++)
{
const NodeId ndb_nodeid = nodes[i].id;
- if (!m_reserved_nodes.has_timedout(ndb_nodeid, now))
- continue;
+ {
+ Guard g(m_reserved_nodes_mutex);
+ if (!m_reserved_nodes.has_timedout(ndb_nodeid, now))
+ continue;
+ }
// Found a timedout reservation
if (theFacade->ext_isConnected(ndb_nodeid))
@@ -3621,7 +3622,7 @@ MgmtSrvr::alloc_node_id_impl(NodeId& nod
"releasing it", ndb_nodeid);
// Clear the reservation
- m_reserved_nodes.clear(ndb_nodeid);
+ release_local_nodeid_reservation(ndb_nodeid);
}
}
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-5.1-telco-7.0 branch (jonas.oreland:4550 to 4551) | Jonas Oreland | 26 Sep |