Below is the list of changes that have just been committed into a local
5.1 repository of jonas. When jonas 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-08-29 13:09:41+02:00, jonas@stripped +4 -0
micro gcp
dd hack to handle not complete gcp (for first gcp)
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp@stripped, 2007-08-29 13:09:38+02:00, jonas@stripped +19 -1
add error insert for delayed SUB_GCP_START
storage/ndb/src/ndbapi/Ndb.cpp@stripped, 2007-08-29 13:09:39+02:00, jonas@stripped +4 -1
move locking into Ndb
storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp@stripped, 2007-08-29 13:09:39+02:00, jonas@stripped +14 -4
Add hack to handle not complete gcp (for first gcp)
storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp@stripped, 2007-08-29 13:09:39+02:00, jonas@stripped +1 -0
Add hack to handle not complete gcp (for first gcp)
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: jonas
# Host: perch.ndb.mysql.com
# Root: /home/jonas/src/telco-6.2-micro-commit
--- 1.141/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2007-08-29 13:09:47 +02:00
+++ 1.142/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2007-08-29 13:09:47 +02:00
@@ -10420,6 +10420,7 @@
subbPtr.p->m_senderRef = origSenderRef; // not sure if API sets correctly
NodeReceiverGroup rg(DBDICT, c_aliveNodes);
+
RequestTracker & p = subbPtr.p->m_reqTracker;
if (!p.init<SubStartRef>(c_counterMgr, rg, GSN_SUB_START_REF, subbPtr.i))
{
@@ -10437,7 +10438,24 @@
ndbout_c("DBDICT(Coordinator) sending GSN_SUB_START_REQ to DBDICT participants subbPtr.i = (%d)", subbPtr.i);
#endif
- sendSignal(rg, GSN_SUB_START_REQ, signal, SubStartReq::SignalLength2, JBB);
+ if (ERROR_INSERTED(6011))
+ {
+ ndbout_c("sending delayed to self...");
+ if (ERROR_INSERTED(6011))
+ {
+ rg.m_nodes.clear(getOwnNodeId());
+ }
+ sendSignal(rg, GSN_SUB_START_REQ, signal,
+ SubStartReq::SignalLength2, JBB);
+ sendSignalWithDelay(reference(),
+ GSN_SUB_START_REQ,
+ signal, 5000, SubStartReq::SignalLength2);
+ }
+ else
+ {
+ sendSignal(rg, GSN_SUB_START_REQ, signal,
+ SubStartReq::SignalLength2, JBB);
+ }
return;
}
/*
--- 1.92/storage/ndb/src/ndbapi/Ndb.cpp 2007-08-29 13:09:47 +02:00
+++ 1.93/storage/ndb/src/ndbapi/Ndb.cpp 2007-08-29 13:09:47 +02:00
@@ -1808,7 +1808,10 @@
int
Ndb::flushIncompleteEvents(Uint64 gci)
{
- return theEventBuffer->flushIncompleteEvents(gci);
+ theEventBuffer->lock();
+ int ret = theEventBuffer->flushIncompleteEvents(gci);
+ theEventBuffer->unlock();
+ return ret;
}
NdbEventOperation *Ndb::nextEvent()
--- 1.99/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp 2007-08-29 13:09:47 +02:00
+++ 1.100/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp 2007-08-29 13:09:47 +02:00
@@ -1125,6 +1125,7 @@
void
NdbEventBuffer::init_gci_containers()
{
+ m_startup_hack = true;
bzero(&m_complete_data, sizeof(m_complete_data));
m_latest_complete_GCI = m_latestGCI = 0;
m_active_gci.clear();
@@ -1203,20 +1204,19 @@
/**
* Find min complete gci
*/
- // called by user thread, so we need to lock the data
- lock();
Uint64 * array = m_known_gci.getBase();
Uint32 mask = m_known_gci.size() - 1;
Uint32 minpos = m_min_gci_index;
Uint32 maxpos = m_max_gci_index;
+ g_eventLogger.info("Flushing incomplete GCI:s < %u/%u",
+ Uint32(gci >> 32), Uint32(gci));
while (minpos != maxpos && array[minpos] < gci)
{
Gci_container* tmp = find_bucket(array[minpos]);
assert(tmp);
assert(maxpos == m_max_gci_index);
- ndbout_c("ndb: flushing incomplete epoch %lld (<%lld)", tmp->m_gci, gci);
if(!tmp->m_data.is_empty())
{
free_list(tmp->m_data);
@@ -1232,7 +1232,6 @@
m_flush_gci = gci;
#endif
- unlock();
return 0;
}
@@ -1732,6 +1731,7 @@
Uint32 minpos = m_min_gci_index;
Uint32 mask = m_known_gci.size() - 1;
+ assert((mask & (mask + 1)) == 0);
bzero(bucket, sizeof(Gci_container));
@@ -1803,6 +1803,8 @@
Uint64 minGCI = m_known_gci[m_min_gci_index];
if(likely(minGCI == 0 || gci == minGCI))
{
+ do_complete:
+ m_startup_hack = false;
complete_bucket(bucket);
m_latestGCI = m_complete_data.m_gci = gci; // before reportStatus
reportStatus();
@@ -1818,6 +1820,14 @@
}
else
{
+ if (unlikely(m_startup_hack))
+ {
+ flushIncompleteEvents(gci);
+ bucket = find_bucket(gci);
+ assert(bucket);
+ assert(bucket->m_gci == gci);
+ goto do_complete;
+ }
/** out of order something */
g_eventLogger.info("out of order bucket: %d gci: %u/%u minGCI: %u/%u m_latestGCI: %u/%u",
(int)(bucket-(Gci_container*)m_active_gci.getBase()),
--- 1.39/storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp 2007-08-29 13:09:47 +02:00
+++ 1.40/storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp 2007-08-29 13:09:47 +02:00
@@ -573,6 +573,7 @@
Ndb *m_ndb;
Uint64 m_latestGCI; // latest "handover" GCI
Uint64 m_latest_complete_GCI; // latest complete GCI (in case of outof order)
+ bool m_startup_hack;
NdbMutex *m_mutex;
struct NdbCondition *p_cond;
| Thread |
|---|
| • bk commit into 5.1 tree (jonas:1.2618) | jonas | 29 Aug |