From: Date: March 12 2008 10:19am Subject: bk commit into 5.1 tree (jonas:1.2196) BUG#35241 List-Archive: http://lists.mysql.com/commits/43811 X-Bug: 35241 Message-Id: <20080312091923.344038E175A@perch.localdomain> 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, 2008-03-12 10:19:20+01:00, jonas@stripped +2 -0 ndb - bug#35241 (drop6) Out of REDO log due to incorrectly handled stopped node storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp@stripped, 2008-03-12 10:19:19+01:00, jonas@stripped +2 -1 bug#35241 storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp@stripped, 2008-03-12 10:19:19+01:00, jonas@stripped +17 -7 bug#35241 # 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/drop6 --- 1.21/storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp 2008-03-12 10:19:23 +01:00 +++ 1.22/storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp 2008-03-12 10:19:23 +01:00 @@ -997,7 +997,8 @@ Uint32 startGci); void findMinGci(ReplicaRecordPtr fmgReplicaPtr, Uint32& keeGci, - Uint32& oldestRestorableGci); + Uint32& oldestRestorableGci, + bool); bool findStartGci(ConstPtr fstReplicaPtr, Uint32 tfstStopGci, Uint32& tfstStartGci, --- 1.65/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2008-03-12 10:19:23 +01:00 +++ 1.66/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2008-03-12 10:19:23 +01:00 @@ -11359,17 +11359,20 @@ /* DESCRIPTION: CHECK FOR MINIMUM GCI RESTORABLE WITH NEW LOCAL */ /* CHECKPOINT. */ /*************************************************************************/ -void Dbdih::checkKeepGci(TabRecordPtr tabPtr, Uint32 fragId, Fragmentstore*, - Uint32 replicaStartIndex) +void Dbdih::checkKeepGci(TabRecordPtr tabPtr, + Uint32 fragId, + Fragmentstore * fragPtrP, + Uint32 replicaStartIndex) { ReplicaRecordPtr ckgReplicaPtr; ckgReplicaPtr.i = replicaStartIndex; + bool stored = (fragPtrP->storedReplicas == replicaStartIndex); while (ckgReplicaPtr.i != RNIL) { jam(); ptrCheckGuard(ckgReplicaPtr, creplicaFileSize, replicaRecord); Uint32 keepGci; Uint32 oldestRestorableGci; - findMinGci(ckgReplicaPtr, keepGci, oldestRestorableGci); + findMinGci(ckgReplicaPtr, keepGci, oldestRestorableGci, stored); if (keepGci < c_lcpState.keepGci) { jam(); /* ------------------------------------------------------------------- */ @@ -11651,7 +11654,8 @@ /*************************************************************************/ void Dbdih::findMinGci(ReplicaRecordPtr fmgReplicaPtr, Uint32& keepGci, - Uint32& oldestRestorableGci) + Uint32& oldestRestorableGci, + bool stored) { Uint32 nextLcpNo; Uint32 lcpNo; @@ -11682,9 +11686,15 @@ oldestRestorableGci = fmgReplicaPtr.p->maxGciStarted[lcpNo]; ndbrequire(((int)oldestRestorableGci) >= 0); return; - } else { + } + else if (stored) + { + /** + * Only check createGci for stored replicas (aka alive nodes) + */ jam(); - if (fmgReplicaPtr.p->createGci[0] == fmgReplicaPtr.p->initialGci) { + if (fmgReplicaPtr.p->createGci[0] == fmgReplicaPtr.p->initialGci) + { jam(); /*------------------------------------------------------------------- * WE CAN STILL RESTORE THIS REPLICA WITHOUT ANY LOCAL CHECKPOINTS BY @@ -11693,7 +11703,7 @@ *-----------------------------------------------------------------*/ keepGci = fmgReplicaPtr.p->createGci[0]; }//if - }//if + } lcpNo = prevLcpNo(lcpNo); } while (lcpNo != nextLcpNo); return;