From: Date: November 15 2007 12:27pm Subject: bk commit into 5.1 tree (jonas:1.2681) BUG#26913 List-Archive: http://lists.mysql.com/commits/37839 X-Bug: 26913 Message-Id: <20071115112741.4E8207D6FF1@perch.ndb.mysql.com> 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-11-15 12:27:35+01:00, jonas@stripped +1 -0 ndb - bug#26913 Dont invalidate LCP of nodes that dont participate in LCP storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp@stripped, 2007-11-15 12:27:33+01:00, jonas@stripped +34 -22 1) Move setLcpActiveStatus to before calcKeepGci (for easy access to c_lcpState.m_participating*) 2) Dont invalidate LCP of nodes that dont participate in LCP diff -Nrup a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp --- a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2007-11-15 12:22:44 +01:00 +++ b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2007-11-15 12:27:33 +01:00 @@ -10636,6 +10636,8 @@ void Dbdih::execTCGETOPSIZECONF(Signal* return; }//if + setLcpActiveStatusStart(signal); + signal->theData[0] = DihContinueB::ZCALCULATE_KEEP_GCI; signal->theData[1] = 0; /* TABLE ID = 0 */ signal->theData[2] = 0; /* FRAGMENT ID = 0 */ @@ -10748,7 +10750,15 @@ void Dbdih::storeNewLcpIdLab(Signal* sig /* CHECK IF ANY NODE MUST BE TAKEN OUT OF SERVICE AND REFILLED WITH */ /* NEW FRESH DATA FROM AN ACTIVE NODE. */ /* ---------------------------------------------------------------------- */ - setLcpActiveStatusStart(signal); + + /** + * This used be done in setLcpActiveStatusStart + * but this function has been move "up" in the flow + * to just before calcKeepGci + */ + checkStartTakeOver(signal); + setNodeRestartInfoBits(); + c_lcpState.setLcpStatus(LCP_COPY_GCI, __LINE__); //#ifdef VM_TRACE // infoEvent("LocalCheckpoint %d started", SYSFILE->latestLCP_ID); @@ -12288,22 +12298,29 @@ void Dbdih::checkKeepGci(TabRecordPtr ta while (ckgReplicaPtr.i != RNIL) { jam(); ptrCheckGuard(ckgReplicaPtr, creplicaFileSize, replicaRecord); - Uint32 keepGci; - Uint32 oldestRestorableGci; - findMinGci(ckgReplicaPtr, keepGci, oldestRestorableGci); - if (keepGci < c_lcpState.keepGci) { - jam(); - /* ------------------------------------------------------------------- */ - /* WE MUST KEEP LOG RECORDS SO THAT WE CAN USE ALL LOCAL CHECKPOINTS */ - /* THAT ARE AVAILABLE. THUS WE NEED TO CALCULATE THE MINIMUM OVER ALL */ - /* FRAGMENTS. */ - /* ------------------------------------------------------------------- */ - c_lcpState.keepGci = keepGci; - }//if - if (oldestRestorableGci > c_lcpState.oldestRestorableGci) { - jam(); - c_lcpState.oldestRestorableGci = oldestRestorableGci; - }//if + if (c_lcpState.m_participatingLQH.get(ckgReplicaPtr.p->procNode)) + { + Uint32 keepGci; + Uint32 oldestRestorableGci; + findMinGci(ckgReplicaPtr, keepGci, oldestRestorableGci); + if (keepGci < c_lcpState.keepGci) { + jam(); + /* ----------------------------------------------------------------- */ + /* WE MUST KEEP LOG RECORDS SO THAT WE CAN USE ALL LOCAL CHECKPOINTS */ + /* THAT ARE AVAILABLE. THUS WE NEED TO CALCULATE THE MINIMUM OVER ALL*/ + /* FRAGMENTS. */ + /* ----------------------------------------------------------------- */ + c_lcpState.keepGci = keepGci; + }//if + if (oldestRestorableGci > c_lcpState.oldestRestorableGci) { + jam(); + c_lcpState.oldestRestorableGci = oldestRestorableGci; + }//if + } + else + { + ndbout_c("dont consicider LCP for node %u", ckgReplicaPtr.p->procNode); + } ckgReplicaPtr.i = ckgReplicaPtr.p->nextReplica; }//while }//Dbdih::checkKeepGci() @@ -14457,11 +14474,6 @@ void Dbdih::setLcpActiveStatusStart(Sign }//switch }//if }//for - if (isMaster()) { - jam(); - checkStartTakeOver(signal); - setNodeRestartInfoBits(); - }//if }//Dbdih::setLcpActiveStatusStart() /*************************************************************************/