Below is the list of changes that have just been committed into a local
5.1 repository of knielsen. When knielsen does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-11-19 13:11:16+01:00, knielsen@ymer.(none) +4 -0
WL#1498: Multi-threaded ndbd.
Fix non-multi-thread-safe EXECUTE_DIRECT() in DIH and DICT.
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp@stripped, 2007-11-19 13:11:12+01:00,
knielsen@ymer.(none) +5 -8
Fix non-multi-thread-safe EXECUTE_DIRECT() in DIH and DICT.
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp@stripped, 2007-11-19 13:11:12+01:00,
knielsen@ymer.(none) +7 -7
Fix non-multi-thread-safe EXECUTE_DIRECT() in DIH and DICT.
storage/ndb/src/kernel/blocks/suma/Suma.cpp@stripped, 2007-11-19 13:11:12+01:00,
knielsen@ymer.(none) +7 -5
Fix non-multi-thread-safe EXECUTE_DIRECT() in DIH and DICT.
Change static var to class member.
storage/ndb/src/kernel/blocks/suma/Suma.hpp@stripped, 2007-11-19 13:11:13+01:00,
knielsen@ymer.(none) +3 -0
Change static var to class member.
diff -Nrup a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
--- a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2007-09-24 17:12:17 +02:00
+++ b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2007-11-19 13:11:12 +01:00
@@ -5156,11 +5156,9 @@ Dbdict::alterTab_writeTableConf(Signal*
req->changeMask = alterTabPtr.p->m_changeMask;
SectionHandle handle(this, alterTabPtr.p->m_tabInfoPtrI);
- signal->theData[AlterTabReq::SignalLength] = alterTabPtr.p->m_tabInfoPtrI;
- EXECUTE_DIRECT(SUMA, GSN_ALTER_TAB_REQ, signal,
- AlterTabReq::SignalLength + 1);
- jamEntry();
- releaseSections(handle);
+ sendSignal(SUMA_REF, GSN_ALTER_TAB_REQ, signal, AlterTabReq::SignalLength,
+ JBB, &handle);
+ /* SUMA will free the long signal section when receiving. */
alterTabPtr.p->m_tabInfoPtrI = RNIL;
AlterTabConf * conf = (AlterTabConf*)signal->getDataPtrSend();
@@ -7492,9 +7490,8 @@ Dbdict::dropTab_writeSchemaConf(Signal*
conf->senderRef = dropTabPtr.p->m_request.senderRef;
else
conf->senderRef = 0;
- EXECUTE_DIRECT(SUMA, GSN_DROP_TAB_CONF, signal,
- DropTabConf::SignalLength);
- jamEntry();
+ sendSignal(SUMA_REF, GSN_DROP_TAB_CONF, signal,
+ DropTabConf::SignalLength, JBB);
*conf= tmp;
}
dropTabPtr.p->m_participantData.m_gsn = GSN_DROP_TAB_CONF;
diff -Nrup a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
--- a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2007-10-12 13:25:02 +02:00
+++ b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2007-11-19 13:11:12 +01:00
@@ -8630,7 +8630,7 @@ Dbdih::execSUB_GCP_COMPLETE_REP(Signal*
ndbrequire(m_micro_gcp.m_state == MicroGcp::M_GCP_COMMITTED);
m_micro_gcp.m_state = MicroGcp::M_GCP_IDLE;
- EXECUTE_DIRECT(SUMA, GSN_SUB_GCP_COMPLETE_REP, signal, signal->length());
+ sendSignal(SUMA_REF, GSN_SUB_GCP_COMPLETE_REP, signal, signal->length(), JBB);
}
/*****************************************************************************/
@@ -9062,16 +9062,16 @@ void Dbdih::writingCopyGciLab(Signal* si
rep->gci_lo = 0;
rep->flags = SubGcpCompleteRep::ON_DISK;
- EXECUTE_DIRECT(LGMAN, GSN_SUB_GCP_COMPLETE_REP, signal,
- SubGcpCompleteRep::SignalLength);
+ sendSignal(LGMAN_REF, GSN_SUB_GCP_COMPLETE_REP, signal,
+ SubGcpCompleteRep::SignalLength, JBB);
jamEntry();
if (m_micro_gcp.m_enabled == false)
{
jam();
- EXECUTE_DIRECT(SUMA, GSN_SUB_GCP_COMPLETE_REP, signal,
- SubGcpCompleteRep::SignalLength);
+ sendSignal(SUMA_REF, GSN_SUB_GCP_COMPLETE_REP, signal,
+ SubGcpCompleteRep::SignalLength, JBB);
jamEntry();
ndbrequire(m_micro_gcp.m_state == MicroGcp::M_GCP_COMMITTED);
m_micro_gcp.m_state = MicroGcp::M_GCP_IDLE;
@@ -15093,8 +15093,8 @@ Dbdih::execDUMP_STATE_ORD(Signal* signal
g_eventLogger.info("Dbdih:: delay write of datapages for table = %d",
dumpState->args[1]);
// Send this dump to ACC and TUP
- EXECUTE_DIRECT(DBACC, GSN_DUMP_STATE_ORD, signal, 2);
- EXECUTE_DIRECT(DBTUP, GSN_DUMP_STATE_ORD, signal, 2);
+ sendSignal(DBACC_REF, GSN_DUMP_STATE_ORD, signal, 2, JBB);
+ sendSignal(DBTUP_REF, GSN_DUMP_STATE_ORD, signal, 2, JBB);
// Start immediate LCP
c_lcpState.ctimer += (1 << c_lcpState.clcpDelay);
diff -Nrup a/storage/ndb/src/kernel/blocks/suma/Suma.cpp
b/storage/ndb/src/kernel/blocks/suma/Suma.cpp
--- a/storage/ndb/src/kernel/blocks/suma/Suma.cpp 2007-09-24 17:12:17 +02:00
+++ b/storage/ndb/src/kernel/blocks/suma/Suma.cpp 2007-11-19 13:11:12 +01:00
@@ -3761,8 +3761,10 @@ Suma::execDROP_TAB_CONF(Signal *signal)
DBUG_VOID_RETURN;
}
-static Uint32 b_dti_buf[MAX_WORDS_META_FILE];
-
+/**
+ * This receives DICT_TAB_INFO in long signal section 1, and releases the data
+ * after use.
+ */
void
Suma::execALTER_TAB_REQ(Signal *signal)
{
@@ -3793,11 +3795,10 @@ Suma::execALTER_TAB_REQ(Signal *signal)
}
// dict coordinator sends info to API
- // Copy DICT_TAB_INFO to local buffer
- SectionHandle handle(this, signal->theData[AlterTabReq::SignalLength]);
+ // Copy DICT_TAB_INFO to local linear buffer
+ SectionHandle handle(this, signal);
SegmentedSectionPtr tabInfoPtr;
handle.getSection(tabInfoPtr, 0);
- handle.clear();
#ifndef DBUG_OFF
ndbout_c("DICT_TAB_INFO in SUMA, tabInfoPtr.sz = %d", tabInfoPtr.sz);
SimplePropertiesSectionReader reader(handle.m_ptr[0],
@@ -3805,6 +3806,7 @@ Suma::execALTER_TAB_REQ(Signal *signal)
reader.printAll(ndbout);
#endif
copy(b_dti_buf, tabInfoPtr);
+ releaseSections(handle);
LinearSectionPtr ptr[3];
ptr[0].p = b_dti_buf;
ptr[0].sz = tabInfoPtr.sz;
diff -Nrup a/storage/ndb/src/kernel/blocks/suma/Suma.hpp
b/storage/ndb/src/kernel/blocks/suma/Suma.hpp
--- a/storage/ndb/src/kernel/blocks/suma/Suma.hpp 2007-09-24 17:12:17 +02:00
+++ b/storage/ndb/src/kernel/blocks/suma/Suma.hpp 2007-11-19 13:11:13 +01:00
@@ -640,6 +640,9 @@ private:
Uint64 m_gcp_monitor;
#endif
+ /* Buffer used in Suma::execALTER_TAB_REQ(). */
+ Uint32 b_dti_buf[MAX_WORDS_META_FILE];
+
};
#endif
| Thread |
|---|
| • bk commit into 5.1 tree (knielsen:1.2626) | knielsen | 19 Nov |