List:Commits« Previous MessageNext Message »
From:jonas Date:April 10 2007 10:10am
Subject:bk commit into 5.1 tree (jonas:1.2137) BUG#27651
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-04-10 10:10:34+02:00, jonas@stripped +1 -0
  ndb - bug#27651 (wl2325-5.0)
    Only prepare "next" GCI if we're in the first 4 highest GCI's
      to avoid we can get several buckets with same GCI

  storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp@stripped, 2007-04-10 10:10:33+02:00,
jonas@stripped +16 -3
    Only prepare "next" GCI if we're in the first 4 highest GCI's
      to avoid we can get several buckets with same GCI

# 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/drop5

--- 1.27/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp	2007-04-10 10:10:38 +02:00
+++ 1.28/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp	2007-04-10 10:10:38 +02:00
@@ -534,7 +534,7 @@
 NdbEventBuffer::NdbEventBuffer(Ndb *ndb) :
   m_system_nodes(ndb->theImpl->theNoOfDBnodes),
   m_ndb(ndb),
-  m_latestGCI(0),
+  m_latestGCI(0), m_latest_complete_GCI(0),
   m_total_alloc(0),
   m_free_thresh(10),
   m_min_free_thresh(10),
@@ -857,6 +857,7 @@
   const Uint32 cnt= rep->gcp_complete_rep_count;
 
   Gci_container *bucket = find_bucket(&m_active_gci, gci);
+  Uint32 idx = bucket - m_active_gci.getBase();
 
   if (unlikely(bucket == 0))
   {
@@ -896,8 +897,20 @@
       }
       reportStatus();
       bzero(bucket, sizeof(Gci_container));
-      bucket->m_gci = gci + ACTIVE_GCI_DIRECTORY_SIZE;
-      bucket->m_gcp_complete_rep_count = m_system_nodes;
+      if (likely(idx < ACTIVE_GCI_DIRECTORY_SIZE))
+      {
+        /**
+         * Only "prepare" next GCI if we're in
+         *   the first 4 highest GCI's...else
+         *   this is somekind of "late" GCI...
+         *   which is only initialized to 0
+         *
+         *   This to make sure we dont get several buckets with same GCI
+         */
+        bucket->m_gci = gci + ACTIVE_GCI_DIRECTORY_SIZE;
+        bucket->m_gcp_complete_rep_count = m_system_nodes;
+      }
+      
       if(unlikely(m_latest_complete_GCI > gci))
       {
 	complete_outof_order_gcis();
Thread
bk commit into 5.1 tree (jonas:1.2137) BUG#27651jonas10 Apr