3769 Jonas Oreland 2012-01-18 [merge]
ndb - merge 71 to 72
modified:
storage/ndb/include/kernel/ndb_limits.h
storage/ndb/src/common/transporter/TransporterRegistry.cpp
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
3768 Frazer Clement 2012-01-17 [merge]
Merge 7.1->7.2
modified:
mysql-test/suite/ndb_rpl/t/show_mysqld_warnings.inc
storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp
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 2012-01-04 14:25:32 +0000
+++ b/storage/ndb/include/kernel/ndb_limits.h 2012-01-18 09:47:02 +0000
@@ -126,11 +126,7 @@
* signals.
* This parameter is configurable, this is the default value.
*/
-#if NDB_VERSION_D < NDB_MAKE_VERSION(7,2,0)
-#define SCAN_BATCH_SIZE 32768
-#else
#define SCAN_BATCH_SIZE 16384
-#endif
/*
* To protect the NDB API from overload we also define a maximum total
* batch size from all nodes. This parameter should most likely be
=== modified file 'storage/ndb/src/common/transporter/TransporterRegistry.cpp'
--- a/storage/ndb/src/common/transporter/TransporterRegistry.cpp 2012-01-17 08:33:59 +0000
+++ b/storage/ndb/src/common/transporter/TransporterRegistry.cpp 2012-01-18 09:47:02 +0000
@@ -754,7 +754,8 @@ TransporterRegistry::prepareSend(Transpo
return SEND_OK;
}
- int sleepTime = 2;
+ set_status_overloaded(nodeId, true);
+ int sleepTime = 2;
/**
* @note: on linux/i386 the granularity is 10ms
@@ -837,12 +838,12 @@ TransporterRegistry::prepareSend(Transpo
return SEND_OK;
}
-
/**
* @note: on linux/i386 the granularity is 10ms
* so sleepTime = 2 generates a 10 ms sleep.
*/
- int sleepTime = 2;
+ set_status_overloaded(nodeId, true);
+ int sleepTime = 2;
for(int i = 0; i<50; i++){
if((nSHMTransporters+nSCITransporters) == 0)
NdbSleep_MilliSleep(sleepTime);
@@ -920,12 +921,12 @@ TransporterRegistry::prepareSend(Transpo
return SEND_OK;
}
-
/**
* @note: on linux/i386 the granularity is 10ms
* so sleepTime = 2 generates a 10 ms sleep.
*/
- int sleepTime = 2;
+ set_status_overloaded(nodeId, true);
+ int sleepTime = 2;
for(int i = 0; i<50; i++){
if((nSHMTransporters+nSCITransporters) == 0)
NdbSleep_MilliSleep(sleepTime);
=== modified file 'storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp 2012-01-17 08:33:59 +0000
+++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp 2012-01-18 09:47:02 +0000
@@ -4283,9 +4283,10 @@ void Dblqh::seizeTcrec()
locTcConnectptr.p->connectState = TcConnectionrec::CONNECTED;
}//Dblqh::seizeTcrec()
-bool Dblqh::checkTransporterOverloaded(Signal* signal,
- const NodeBitmask& all,
- const LqhKeyReq* req)
+bool
+Dblqh::checkTransporterOverloaded(Signal* signal,
+ const NodeBitmask& all,
+ const LqhKeyReq* req)
{
// nodes likely to be affected by this op
NodeBitmask mask;
@@ -4402,16 +4403,29 @@ void Dblqh::execLQHKEYREQ(Signal* signal
{
const NodeBitmask& all = globalTransporterRegistry.get_status_overloaded();
- if (unlikely((!all.isclear() &&
- checkTransporterOverloaded(signal, all, lqhKeyReq))) ||
- ERROR_INSERTED_CLEAR(5047)) {
- jam();
- releaseSections(handle);
- noFreeRecordLab(signal, lqhKeyReq, ZTRANSPORTER_OVERLOADED_ERROR);
- return;
+ if (unlikely(!all.isclear()))
+ {
+ if (checkTransporterOverloaded(signal, all, lqhKeyReq))
+ {
+ /**
+ * TODO: We should have counters for this...
+ */
+ jam();
+ releaseSections(handle);
+ noFreeRecordLab(signal, lqhKeyReq, ZTRANSPORTER_OVERLOADED_ERROR);
+ return;
+ }
}
}
+ if (ERROR_INSERTED_CLEAR(5047))
+ {
+ jam();
+ releaseSections(handle);
+ noFreeRecordLab(signal, lqhKeyReq, ZTRANSPORTER_OVERLOADED_ERROR);
+ return;
+ }
+
sig0 = lqhKeyReq->clientConnectPtr;
if (cfirstfreeTcConrec != RNIL && !ERROR_INSERTED_CLEAR(5031)) {
jamEntry();
@@ -11269,6 +11283,21 @@ void Dblqh::scanTupkeyConfLab(Signal* si
scanptr.p->m_curr_batch_size_bytes+= tdata4 * sizeof(Uint32);
scanptr.p->m_curr_batch_size_rows = rows + 1;
scanptr.p->m_last_row = tdata5;
+
+ const NodeBitmask& all = globalTransporterRegistry.get_status_overloaded();
+ if (unlikely(!all.isclear()))
+ {
+ if (all.get(refToNode(scanptr.p->scanApiBlockref)))
+ {
+ /**
+ * End scan batch if transporter-buffer are overloaded
+ *
+ * TODO: We should have counters for this...
+ */
+ tdata5 = 1;
+ }
+ }
+
if (scanptr.p->check_scan_batch_completed() | tdata5){
if (scanptr.p->scanLockHold == ZTRUE) {
jam();
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-5.5-cluster-7.2 branch (jonas.oreland:3768 to 3769) | Jonas Oreland | 20 Jan |