#At file:///home/jonas/src/telco-7.0/ based on revid:jonas@stripped
4421 Jonas Oreland 2011-05-26
ndb - implement support for multi DIVERIFY_queue's
modified:
storage/ndb/include/kernel/ndb_limits.h
storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
=== modified file 'storage/ndb/include/kernel/ndb_limits.h'
--- a/storage/ndb/include/kernel/ndb_limits.h 2011-04-13 08:51:04 +0000
+++ b/storage/ndb/include/kernel/ndb_limits.h 2011-05-26 11:49:47 +0000
@@ -197,6 +197,7 @@
#define MAX_NDBMT_LQH_WORKERS 4
#define MAX_NDBMT_LQH_THREADS 4
+#define MAX_NDBMT_TC_THREADS 2
#define NDB_FILE_BUFFER_SIZE (256*1024)
=== modified file 'storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp'
--- a/storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp 2011-05-25 09:30:37 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp 2011-05-26 11:49:47 +0000
@@ -1314,6 +1314,7 @@ private:
struct DIVERIFY_queue
{
DIVERIFY_queue() {
+ m_ref = 0;
cfirstVerifyQueue = clastVerifyQueue = 0;
apiConnectRecord = 0;
m_empty_done = 1;
@@ -1322,6 +1323,7 @@ private:
Uint32 cfirstVerifyQueue;
Uint32 clastVerifyQueue;
Uint32 m_empty_done;
+ Uint32 m_ref;
};
bool isEmpty(const DIVERIFY_queue&);
@@ -1330,7 +1332,7 @@ private:
void emptyverificbuffer(Signal *, Uint32 q, bool aContintueB);
void emptyverificbuffer_check(Signal*, Uint32, Uint32);
- DIVERIFY_queue c_diverify_queue[1];
+ DIVERIFY_queue c_diverify_queue[MAX_NDBMT_LQH_THREADS];
Uint32 c_diverify_queue_cnt;
/*------------------------------------------------------------------------*/
=== modified file 'storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2011-05-26 11:10:07 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2011-05-26 11:49:47 +0000
@@ -9304,10 +9304,13 @@ void Dbdih::execDIVERIFYREQ(Signal* sign
{
EmulatedJamBuffer * jambuf = * (EmulatedJamBuffer**)(signal->theData+2);
thrjamEntry(jambuf);
+ Uint32 qno = signal->theData[1];
+ ndbassert(qno < NDB_ARRAY_SIZE(c_diverify_queue));
+ DIVERIFY_queue & q = c_diverify_queue[qno];
loop:
Uint32 val = m_micro_gcp.m_lock.read_lock();
Uint32 blocked = getBlockCommit() == true ? 1 : 0;
- if (blocked == 0 && isEmpty(c_diverify_queue[0]))
+ if (blocked == 0 && isEmpty(q))
{
thrjam(jambuf);
/*-----------------------------------------------------------------------*/
@@ -9328,7 +9331,6 @@ loop:
// Since we are blocked we need to put this operation last in the verify
// queue to ensure that operation starts up in the correct order.
/*-------------------------------------------------------------------------*/
- DIVERIFY_queue & q = c_diverify_queue[0];
enqueue(q, signal->theData[0], m_micro_gcp.m_new_gci);
if (blocked == 0 && jambuf == jamBuffer())
{
@@ -14785,7 +14787,7 @@ Dbdih::emptyverificbuffer(Signal* signal
signal->theData[1] = (Uint32)(m_micro_gcp.m_current_gci >> 32);
signal->theData[2] = (Uint32)(m_micro_gcp.m_current_gci & 0xFFFFFFFF);
signal->theData[3] = 0;
- sendSignal(clocaltcblockref, GSN_DIVERIFYCONF, signal, 4, JBB);
+ sendSignal(c_diverify_queue[q].m_ref, GSN_DIVERIFYCONF, signal, 4, JBB);
}
else if (aContinueB == true)
{
@@ -15532,8 +15534,13 @@ void Dbdih::initialiseRecordsLab(Signal*
case 1:{
ApiConnectRecordPtr apiConnectptr;
jam();
+ c_diverify_queue[0].m_ref = calcTcBlockRef(getOwnNodeId());
for (Uint32 i = 0; i < c_diverify_queue_cnt; i++)
{
+ if (c_diverify_queue_cnt > 1)
+ {
+ c_diverify_queue[i].m_ref = numberToRef(DBTC, i + 1, 0);
+ }
/******** INTIALIZING API CONNECT RECORDS ********/
for (apiConnectptr.i = 0;
apiConnectptr.i < capiConnectFileSize; apiConnectptr.i++)
=== modified file 'storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp 2011-05-25 13:19:02 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp 2011-05-26 11:49:47 +0000
@@ -4887,6 +4887,7 @@ void Dbtc::diverify010Lab(Signal* signal
UintR TfirstfreeApiConnectCopy = cfirstfreeApiConnectCopy;
ApiConnectRecord * const regApiPtr = apiConnectptr.p;
signal->theData[0] = apiConnectptr.i;
+ signal->theData[1] = instance() ? instance() - 1 : 0;
if (ERROR_INSERTED(8022)) {
jam();
systemErrorLab(signal, __LINE__);
Attachment: [text/bzr-bundle] bzr/jonas@mysql.com-20110526114947-16oq68j6cjbf93v8.bundle
| Thread |
|---|
| • bzr commit into mysql-5.1-telco-7.0 branch (jonas:4421) | Jonas Oreland | 26 May |