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
1.2075 06/01/25 11:02:19 jonas@stripped +2 -0
bug#10987 - ndb - unable to find restorable replica
Add massive printout when failure detected
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
1.48 06/01/25 11:02:16 jonas@stripped +79 -0
Add dumping of replica info
storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp
1.13 06/01/25 11:02:16 jonas@stripped +2 -0
Add dumping of replica info
# 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/51-new
--- 1.12/storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp 2006-01-12 19:50:33 +01:00
+++ 1.13/storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp 2006-01-25 11:02:16 +01:00
@@ -1601,6 +1601,8 @@
* Reply from nodeId
*/
void startInfoReply(Signal *, Uint32 nodeId);
+
+ void dump_replica_info();
};
#if (DIH_CDATA_SIZE < _SYSFILE_SIZE32)
--- 1.47/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2006-01-17 09:24:53 +01:00
+++ 1.48/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2006-01-25 11:02:16 +01:00
@@ -8925,6 +8925,80 @@
/*****************************************************************************/
/* ********** START FRAGMENT MODULE *************/
/*****************************************************************************/
+void
+Dbdih::dump_replica_info()
+{
+ TabRecordPtr tabPtr;
+ FragmentstorePtr fragPtr;
+
+ for(tabPtr.i = 0; tabPtr.i < ctabFileSize; tabPtr.i++)
+ {
+ ptrCheckGuard(tabPtr, ctabFileSize, tabRecord);
+ if (tabPtr.p->tabStatus != TabRecord::TS_ACTIVE)
+ continue;
+
+ for(Uint32 fid = 0; fid<tabPtr.p->totalfragments; fid++)
+ {
+ getFragstore(tabPtr.p, fid, fragPtr);
+ ndbout_c("tab: %d frag: %d gci: %d\n -- storedReplicas:",
+ tabPtr.i, fid, SYSFILE->newestRestorableGCI);
+
+ Uint32 i;
+ ReplicaRecordPtr replicaPtr;
+ replicaPtr.i = fragPtr.p->storedReplicas;
+ for(; replicaPtr.i != RNIL; replicaPtr.i = replicaPtr.p->nextReplica)
+ {
+ ptrCheckGuard(replicaPtr, creplicaFileSize, replicaRecord);
+ ndbout_c(" node: %d initialGci: %d nextLcp: %d noCrashedReplicas: %d",
+ replicaPtr.p->procNode,
+ replicaPtr.p->initialGci,
+ replicaPtr.p->nextLcp,
+ replicaPtr.p->noCrashedReplicas);
+ for(i = 0; i<MAX_LCP_STORED; i++)
+ {
+ ndbout_c(" i: %d %s : lcpId: %d maxGci Completed: %d Started: %d",
+ i,
+ (replicaPtr.p->lcpStatus[i] == ZVALID ?"VALID":"INVALID"),
+ replicaPtr.p->lcpId[i],
+ replicaPtr.p->maxGciCompleted[i],
+ replicaPtr.p->maxGciStarted[i]);
+ }
+
+ for (i = 0; i < 8; i++)
+ {
+ ndbout_c(" crashed replica: %d replicaLastGci: %d createGci: %d",
+ i,
+ replicaPtr.p->replicaLastGci[i],
+ replicaPtr.p->createGci[i]);
+ }
+ }
+ ndbout_c(" -- oldStoredReplicas");
+ replicaPtr.i = fragPtr.p->oldStoredReplicas;
+ for(; replicaPtr.i != RNIL; replicaPtr.i = replicaPtr.p->nextReplica)
+ {
+ ptrCheckGuard(replicaPtr, creplicaFileSize, replicaRecord);
+ for(i = 0; i<MAX_LCP_STORED; i++)
+ {
+ ndbout_c(" i: %d %s : lcpId: %d maxGci Completed: %d Started: %d",
+ i,
+ (replicaPtr.p->lcpStatus[i] == ZVALID ?"VALID":"INVALID"),
+ replicaPtr.p->lcpId[i],
+ replicaPtr.p->maxGciCompleted[i],
+ replicaPtr.p->maxGciStarted[i]);
+ }
+
+ for (i = 0; i < 8; i++)
+ {
+ ndbout_c(" crashed replica: %d replicaLastGci: %d createGci: %d",
+ i,
+ replicaPtr.p->replicaLastGci[i],
+ replicaPtr.p->createGci[i]);
+ }
+ }
+ }
+ }
+}
+
void Dbdih::startFragment(Signal* signal, Uint32 tableId, Uint32 fragId)
{
Uint32 TloopCount = 0;
@@ -8986,6 +9060,7 @@
/* SEARCH FOR STORED REPLICAS THAT CAN BE USED TO RESTART THE SYSTEM. */
/* ----------------------------------------------------------------------- */
searchStoredReplicas(fragPtr);
+
if (cnoOfCreateReplicas == 0) {
/* --------------------------------------------------------------------- */
/* THERE WERE NO STORED REPLICAS AVAILABLE THAT CAN SERVE AS REPLICA TO*/
@@ -8998,6 +9073,10 @@
char buf[64];
BaseString::snprintf(buf, sizeof(buf), "table: %d fragment: %d gci: %d",
tableId, fragId, SYSFILE->newestRestorableGCI);
+
+ ndbout_c(buf);
+ dump_replica_info();
+
progError(__LINE__, NDBD_EXIT_NO_RESTORABLE_REPLICA, buf);
ndbrequire(false);
return;
| Thread |
|---|
| • bk commit into 5.1 tree (jonas:1.2075) BUG#10987 | jonas | 25 Jan |