MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:jonas Date:September 29 2007 9:29am
Subject:bk commit into 5.1 tree (jonas:1.2584) BUG#31257
View as plain text  
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-09-29 11:29:17+02:00, jonas@stripped +2 -0
  ndb - bug#31257
    handle partially complete LCP better in SR

  storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp@stripped, 2007-09-29 11:29:15+02:00, jonas@stripped +1 -0
    add new variable

  storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp@stripped, 2007-09-29 11:29:15+02:00, jonas@stripped +34 -1
    remove ongoing LCP from node if it did nto complete first

# 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.1

--- 1.30/storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp	2007-09-29 11:29:22 +02:00
+++ 1.31/storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp	2007-09-29 11:29:22 +02:00
@@ -318,6 +318,7 @@
     Uint8 noOfStartedChkpt;
 
     MasterLCPConf::State lcpStateAtTakeOver;
+    Uint32 m_remove_node_from_table_lcp_id;
   };
   typedef Ptr<NodeRecord> NodeRecordPtr;
   /**********************************************************************/

--- 1.119/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2007-09-29 11:29:22 +02:00
+++ 1.120/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2007-09-29 11:29:22 +02:00
@@ -5060,6 +5060,18 @@
     return;
   }
   
+  /**
+   * If node has node complete LCP
+   *   we need to remove it as undo might not be complete
+   *   bug#31257
+   */
+  failedNodePtr.p->m_remove_node_from_table_lcp_id = RNIL;
+  if (c_lcpState.m_LCP_COMPLETE_REP_Counter_LQH.isWaitingFor(failedNodePtr.i))
+  {
+    jam();
+    failedNodePtr.p->m_remove_node_from_table_lcp_id = SYSFILE->latestLCP_ID;
+  }
+  
   jam();
   signal->theData[0] = DihContinueB::ZREMOVE_NODE_FROM_TABLE;
   signal->theData[1] = failedNodePtr.i;
@@ -5701,6 +5713,11 @@
     return;
   }//if  
 
+  NodeRecordPtr nodePtr;
+  nodePtr.i = nodeId;
+  ptrCheckGuard(nodePtr, MAX_NDB_NODES, nodeRecord);
+  const Uint32 lcpId = nodePtr.p->m_remove_node_from_table_lcp_id;
+
   /**
    * For each fragment
    */
@@ -5708,7 +5725,6 @@
   Uint32 noOfRemovedLcpReplicas = 0;  // No of replicas in LCP removed 
   Uint32 noOfRemainingLcpReplicas = 0;// No of replicas in LCP remaining
 
-  //const Uint32 lcpId = SYSFILE->latestLCP_ID;
   const bool lcpOngoingFlag = (tabPtr.p->tabLcpStatus== TabRecord::TLS_ACTIVE);
   const bool unlogged = (tabPtr.p->tabStorage != TabRecord::ST_NORMAL);
   
@@ -5743,6 +5759,23 @@
 	  noOfRemovedLcpReplicas ++;
 	  replicaPtr.p->lcpOngoingFlag = false;
 	}
+
+        if (lcpId != RNIL)
+        {
+          jam();
+          Uint32 lcpNo = prevLcpNo(replicaPtr.p->nextLcp);
+          if (replicaPtr.p->lcpStatus[lcpNo] == ZVALID && 
+              replicaPtr.p->lcpId[lcpNo] == SYSFILE->latestLCP_ID)
+          {
+            jam();
+            replicaPtr.p->lcpStatus[lcpNo] = ZINVALID;       
+            replicaPtr.p->lcpId[lcpNo] = 0;
+            replicaPtr.p->nextLcp = lcpNo;
+            ndbout_c("REMOVING lcp: %u from table: %u frag: %u node: %u",
+                     SYSFILE->latestLCP_ID,
+                     tabPtr.i, fragNo, nodeId);
+          }
+        }
       }
     }
     if (!found)
Thread
bk commit into 5.1 tree (jonas:1.2584) BUG#31257jonas29 Sep