List:Commits« Previous MessageNext Message »
From:Maitrayi Sabaratnam Date:November 2 2010 4:05pm
Subject:bzr commit into mysql-5.1-telco-7.0 branch (maitrayi.sabaratnam:3915)
View as plain text  
#At file:///export/tmp/maitrayi/mysql-src/repo-7.0/mysql-5.1-telco-7.0-bug54199/ based on revid:magnus.blaudd@stripped

 3915 Maitrayi Sabaratnam	2010-11-02
      BUG54199 Cluster+DiskData, Querying INFORMATION_SCHEMA.FILES slow when data node is down

    modified:
      sql/ha_ndbcluster.cc
      storage/ndb/include/ndbapi/ndb_cluster_connection.hpp
      storage/ndb/src/ndbapi/ndb_cluster_connection.cpp
      storage/ndb/src/ndbapi/ndb_cluster_connection_impl.hpp
=== modified file 'sql/ha_ndbcluster.cc'

=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc	2010-10-22 14:25:43 +0000
+++ b/sql/ha_ndbcluster.cc	2010-11-02 16:05:06 +0000
@@ -14069,7 +14069,7 @@
     
     g_ndb_cluster_connection->init_get_next_node(iter);
 
-    while ((id= g_ndb_cluster_connection->get_next_node(iter)))
+    while ((id= g_ndb_cluster_connection->get_next_alive_node(iter)))
     {
       init_fill_schema_files_row(table);
       NdbDictionary::Datafile df= dict->getDatafile(id, elt.name);
@@ -14201,7 +14201,7 @@
 
     g_ndb_cluster_connection->init_get_next_node(iter);
 
-    while ((id= g_ndb_cluster_connection->get_next_node(iter)))
+    while ((id= g_ndb_cluster_connection->get_next_alive_node(iter)))
     {
       NdbDictionary::Undofile uf= dict->getUndofile(id, elt.name);
       ndberr= dict->getNdbError();

=== modified file 'storage/ndb/include/ndbapi/ndb_cluster_connection.hpp'
--- a/storage/ndb/include/ndbapi/ndb_cluster_connection.hpp	2010-05-04 14:34:54 +0000
+++ b/storage/ndb/include/ndbapi/ndb_cluster_connection.hpp	2010-11-02 16:05:06 +0000
@@ -182,6 +182,7 @@
 
   void init_get_next_node(Ndb_cluster_connection_node_iter &iter);
   unsigned int get_next_node(Ndb_cluster_connection_node_iter &iter);
+  unsigned int get_next_alive_node(Ndb_cluster_connection_node_iter &iter);
   unsigned get_active_ndb_objects() const;
   
   Uint64 *get_latest_trans_gci();

=== modified file 'storage/ndb/src/ndbapi/ndb_cluster_connection.cpp'
--- a/storage/ndb/src/ndbapi/ndb_cluster_connection.cpp	2010-10-07 05:39:39 +0000
+++ b/storage/ndb/src/ndbapi/ndb_cluster_connection.cpp	2010-11-02 16:05:06 +0000
@@ -195,6 +195,28 @@
   return node.id;
 }
 
+Uint32
+Ndb_cluster_connection_impl::get_next_alive_node(Ndb_cluster_connection_node_iter &iter)
+{
+  Uint32 id;
+
+  TransporterFacade *tp = m_impl.m_transporter_facade;
+  if (tp == 0 || tp->ownId() == 0)
+    return 0;
+
+  while (id = get_next_node(iter))
+  {
+    tp->lock_mutex();
+    if (tp->get_node_alive(id) != 0)
+    {
+      tp->unlock_mutex();
+      return id;
+    }
+    tp->unlock_mutex();
+  }
+  return 0;
+}
+
 unsigned
 Ndb_cluster_connection::no_db_nodes()
 {
@@ -816,6 +838,12 @@
   return m_impl.get_next_node(iter);
 }
 
+unsigned int 
+Ndb_cluster_connection::get_next_alive_node(Ndb_cluster_connection_node_iter &iter)
+{
+  return m_impl.get_next_alive_node(iter);
+}
+
 unsigned
 Ndb_cluster_connection::get_active_ndb_objects() const
 {

=== modified file 'storage/ndb/src/ndbapi/ndb_cluster_connection_impl.hpp'
--- a/storage/ndb/src/ndbapi/ndb_cluster_connection_impl.hpp	2010-09-30 11:52:49 +0000
+++ b/storage/ndb/src/ndbapi/ndb_cluster_connection_impl.hpp	2010-11-02 16:05:06 +0000
@@ -63,6 +63,7 @@
 
   void init_get_next_node(Ndb_cluster_connection_node_iter &iter);
   Uint32 get_next_node(Ndb_cluster_connection_node_iter &iter);
+  Uint32 get_next_alive_node(Ndb_cluster_connection_node_iter &iter);
 
   inline unsigned get_connect_count() const;
 public:


Attachment: [text/bzr-bundle] bzr/maitrayi.sabaratnam@oracle.com-20101102160506-03888cho9uqx2j3w.bundle
Thread
bzr commit into mysql-5.1-telco-7.0 branch (maitrayi.sabaratnam:3915) Maitrayi Sabaratnam2 Nov