List:Commits« Previous MessageNext Message »
From:Martin Skold Date:February 6 2008 2:08pm
Subject:bk commit into 5.0 tree (mskold:1.2596)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of mskold.  When mskold 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-02-06 15:08:45+01:00, mskold@stripped +1 -0
  Added random sleeps before retrying temporarly failed DICT signals, to avoid race conditions

  ndb/src/ndbapi/NdbDictionaryImpl.cpp@stripped, 2008-02-06 15:08:36+01:00, mskold@stripped +18 -1
    Added random sleeps before retrying temporarly failed DICT signals, to avoid race conditions

diff -Nrup a/ndb/src/ndbapi/NdbDictionaryImpl.cpp b/ndb/src/ndbapi/NdbDictionaryImpl.cpp
--- a/ndb/src/ndbapi/NdbDictionaryImpl.cpp	2007-08-20 17:29:37 +02:00
+++ b/ndb/src/ndbapi/NdbDictionaryImpl.cpp	2008-02-06 15:08:36 +01:00
@@ -35,6 +35,7 @@
 #include "NdbBlobImpl.hpp"
 #include <AttributeHeader.hpp>
 #include <my_sys.h>
+#include <NdbSleep.h>
 
 #define DEBUG_PRINT 0
 #define INCOMPATIBLE_VERSION -2
@@ -886,7 +887,23 @@ NdbDictInterface::dictSignal(NdbApiSigna
 {
   DBUG_ENTER("NdbDictInterface::dictSignal");
   DBUG_PRINT("enter", ("useMasterNodeId: %d", useMasterNodeId));
-  for(Uint32 i = 0; i<RETRIES; i++){
+
+  int sleep = 50;
+  int mod = 5;
+
+  for(Uint32 i = 0; i<RETRIES; i++)
+  {
+    if (i > 0)
+      NdbSleep_MilliSleep(sleep + 10 * (rand() % mod));
+    if (i == RETRIES / 2)
+    {
+      mod = 10;
+    }
+    if (i == 3*RETRIES/4)
+    {
+      sleep = 100;
+    }
+
     //if (useMasterNodeId == 0)
     m_buffer.clear();
 
Thread
bk commit into 5.0 tree (mskold:1.2596)Martin Skold6 Feb