List:Commits« Previous MessageNext Message »
From:jonas Date:October 12 2006 2:26pm
Subject:bk commit into 5.1 tree (jonas:1.2064) BUG#23210
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, 2006-10-12 14:26:53+02:00, jonas@stripped +2 -0
  ndb - bug#23210
      Fix race-condition between COPY_GCIREQ (GCP) and lcpSetActiveStatusEnd
      Solution is _not_ to copy sysfileData from COPY_GCIREQ from "self"
  
    recommit in mysql-5.1-wl2325-5.0

  storage/ndb/src/kernel/blocks/ERROR_codes.txt@stripped, 2006-10-12 14:26:52+02:00, jonas@stripped +3 -1
    Add error insert for dealying of copy sysfileData

  storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp@stripped, 2006-10-12 14:26:52+02:00, jonas@stripped +32 -6
    1) Add error insert for delaying of sysfileData
    2) Change to that master is _not_ copying sysfileData from COPY_GCIREQ
       as it might be updating it while COPY_GCIREQ is "in the fly"

# 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/mysql-5.1-wl2325-5.0

--- 1.15/storage/ndb/src/kernel/blocks/ERROR_codes.txt	2006-10-12 14:26:56 +02:00
+++ 1.16/storage/ndb/src/kernel/blocks/ERROR_codes.txt	2006-10-12 14:26:56 +02:00
@@ -5,7 +5,7 @@
 Next DBTUP 4013
 Next DBLQH 5042
 Next DBDICT 6007
-Next DBDIH 7174
+Next DBDIH 7178
 Next DBTC 8037
 Next CMVMI 9000
 Next BACKUP 10022
@@ -63,6 +63,8 @@
 
 7030: Delay in GCP_PREPARE until node has completed a node failure
 7031: Delay in GCP_PREPARE and die 3s later
+
+7177: Delay copying of sysfileData in execCOPY_GCIREQ
 
 ERROR CODES FOR TESTING NODE FAILURE, LOCAL CHECKPOINT HANDLING:
 -----------------------------------------------------------------

--- 1.51/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2006-10-12 14:26:56 +02:00
+++ 1.52/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2006-10-12 14:26:56 +02:00
@@ -626,22 +626,48 @@
   ndbrequire(c_copyGCISlave.m_copyReason  == CopyGCIReq::IDLE);
   ndbrequire(c_copyGCISlave.m_expectedNextWord == tstart);
   ndbrequire(reason != CopyGCIReq::IDLE);
-  
+  bool isdone = (tstart + CopyGCIReq::DATA_SIZE) >= Sysfile::SYSFILE_SIZE32;
+
+  if (ERROR_INSERTED(7177))
+  {
+    jam();
+
+    if (signal->getLength() == 3)
+    {
+      jam();
+      goto done;
+    }
+  }
+
   arrGuard(tstart + CopyGCIReq::DATA_SIZE, sizeof(sysfileData)/4);
   for(Uint32 i = 0; i<CopyGCIReq::DATA_SIZE; i++)
     cdata[tstart+i] = copyGCI->data[i];
   
-  if ((tstart + CopyGCIReq::DATA_SIZE) >= Sysfile::SYSFILE_SIZE32) {
+  if (ERROR_INSERTED(7177) && isMaster() && isdone)
+  {
+    sendSignalWithDelay(reference(), GSN_COPY_GCIREQ, signal, 1000, 3);
+    return;
+  }
+  
+done:  
+  if (isdone)
+  {
     jam();
     c_copyGCISlave.m_expectedNextWord = 0;
-  } else {
+  } 
+  else 
+  {
     jam();
     c_copyGCISlave.m_expectedNextWord += CopyGCIReq::DATA_SIZE;
     return;
-  }//if
-  
-  memcpy(sysfileData, cdata, sizeof(sysfileData));
+  }
   
+  if (cmasterdihref != reference())
+  {
+    jam();
+    memcpy(sysfileData, cdata, sizeof(sysfileData));
+  }
+
   c_copyGCISlave.m_copyReason = reason;
   c_copyGCISlave.m_senderRef  = signal->senderBlockRef();
   c_copyGCISlave.m_senderData = copyGCI->anyData;
Thread
bk commit into 5.1 tree (jonas:1.2064) BUG#23210jonas12 Oct