List:Commits« Previous MessageNext Message »
From:jon Date:May 10 2007 12:58pm
Subject:svn commit - mysqldoc@docsrva: r6416 - in trunk: ndbapi refman-5.1
View as plain text  
Author: jstephens
Date: 2007-05-10 14:58:45 +0200 (Thu, 10 May 2007)
New Revision: 6416

Log:

Preliminary documentation of MGM timeouts (WL#3704).



Modified:
   trunk/ndbapi/mgm-api.xml
   trunk/ndbapi/mgm-function-template.xml
   trunk/refman-5.1/news-5.1.xml


Modified: trunk/ndbapi/mgm-api.xml
===================================================================
--- trunk/ndbapi/mgm-api.xml	2007-05-10 12:47:00 UTC (rev 6415)
+++ trunk/ndbapi/mgm-api.xml	2007-05-10 12:58:45 UTC (rev 6416)
Changed blocks: 2, Lines Added: 290, Lines Deleted: 0; 7813 bytes

@@ -1980,6 +1980,195 @@
 -->
 
       </section>
+      
+      <section id="ndb-mgm-number-of-mgmd-in-connect-string">
+        
+        <title><literal>ndb_mgm_number_of_mgmd_in_connect_string()</literal></title>
+        
+        <formalpara>
+          
+          <title>Description</title>
+          
+          <para>
+            This is a convenience function which provides an easy way to
+            determine the number of management servers referenced in a
+            connectstring as set using
+            <literal>ndb_mgm_set_connectstring()</literal>.
+          </para>
+          
+        </formalpara>
+        
+        <para>
+          This function was added in MySQL 5.1.18.
+        </para>
+        
+        <formalpara>
+          
+          <title>Signature</title>
+          
+          <para>
+<programlisting>
+int ndb_mgm_number_of_mgmd_in_connect_string
+    (
+      NdbMgmHandle <replaceable>handle</replaceable>
+    )
+</programlisting>
+          </para>
+          
+        </formalpara>
+        
+        <formalpara>
+          
+          <title>Parameters</title>
+          
+          <para>
+            A management handle (<literal>NdbMgmHandle</literal>).
+          </para>
+          
+        </formalpara>
+        
+        <formalpara>
+          
+          <title>Return Value</title>
+          
+          <para>
+            On success, a non-negative integer; a negative integer
+            indicates failure.
+          </para>
+          
+        </formalpara>
+      
+<!--      
+        <formalpara>
+          
+          <title>Example</title>
+          
+          <para>
+            <programlisting>
+[<emphasis>To be supplied...</emphasis>]
+</programlisting>
+          </para>
+          
+        </formalpara>
+-->        
+      </section>
+      
+      <section id="ndb-mgm-set-bindaddress">
+        
+        <title><literal>()</literal></title>
+        
+        <indexterm>
+          <primary><literal>ndb_mgm_set_bindaddress()</literal> function (MGM API)</primary>
+        </indexterm>
+        
+        <formalpara>
+          
+          <title>Description</title>
+          
+          <para>
+            This function allows you to set a local bind address for the
+            management server. If used, it must be called before
+            connecting to the management server.
+          </para>
+          
+        </formalpara>
+        
+        <para>
+          This function was added in MySQL 5.1.18.
+        </para>
+        
+        <formalpara>
+          
+          <title>Signature</title>
+          
+          <para>
+<programlisting>
+int ndb_mgm_set_bindaddress
+    (
+      NdbMgmHandle <replaceable>handle</replaceable>, 
+      const char*  <replaceable>address</replaceable>
+    )
+</programlisting>
+          </para>
+          
+        </formalpara>
+        
+        <formalpara>
+          
+          <title>Parameters</title>
+          
+          <para>
+            This function takes two parameters:
+            
+            <itemizedlist>
+              <listitem>
+                <para>
+                  A management handle (<literal>NdbMgmHandle</literal>).
+                </para>
+              </listitem>
+              
+              <listitem>
+                <para>
+                  A string <replaceable>address</replaceable> of the
+                  form
+                  <literal><replaceable>host</replaceable>[:<replaceable>port</replaceable>]</literal>.
+                  
+                </para>
+              </listitem>
+            </itemizedlist>
+            
+          </para>
+          
+        </formalpara>
+        
+        <formalpara>
+          
+          <title>Return Value</title>
+          
+          <para>
+            Returns an integer:
+            
+            <itemizedlist>
+              <listitem>
+                <para>
+                  <literal>0</literal> indicates success
+                </para>
+              </listitem>
+              
+              <listitem>
+                <para>
+                  Any nonzero value indicates failure (the address was
+                  not valid)
+                </para>
+                
+                <important>
+                  <para>
+                    Errors caused by binding an otherwise valid local
+                    address are not reported until the connection to the
+                    management is actually attempted.
+                  </para>
+                </important>
+              </listitem>
+            </itemizedlist>
+            
+          </para>
+          
+        </formalpara>
+        
+<!--        
+        <formalpara>
+          
+          <title>Example</title>
+          
+          <para>
+            <programlisting>
+[<emphasis>To be supplied...</emphasis>]
+</programlisting>
+          </para>
+          
+        </formalpara>
+-->        
+      </section>
 
       <section id="ndb-mgm-set-connectstring">
 

@@ -2204,7 +2393,108 @@
 -->
 
       </section>
+      
+      <section id="ndb-mgm-set-timeout">
+        
+        <title><literal>ndb_mgm_set_timeout()</literal></title>
+        
+        <indexterm>
+          <primary><literal>ndb_mgm_set_timeout()</literal> function (MGM API)</primary>
+        </indexterm>
+        
+        <formalpara>
+          
+          <title>Description</title>
+          
+          <para>
+            Normally, network operations time out after 60 seconds. This
+            function allows you to vary this time.
+          </para>
+          
+        </formalpara>
+        
+        <para>
+          This function was introduced in MySQL 5.1.18.
+        </para>
+        
+        <formalpara>
+          
+          <title>Signature</title>
+          
+          <para>
+<programlisting>
+int ndb_mgm_set_timeout
+    (
+      NdbMgmHandle <replaceable>handle</replaceable>, 
+      unsigned int <replaceable>timeout</replaceable>
+    )
+</programlisting>
+          </para>
+          
+        </formalpara>
+        
+        <formalpara>
+          
+          <title>Parameters</title>
+          
+          <para>
+            This function takes two parameters:
+            
+            <itemizedlist>
+              <listitem>
+                <para>
+                  A management server handle
+                  (<literal>NdbMgmHandle</literal>).
+                </para>
+              </listitem>
+              
+              <listitem>
+                <para>
+                  An amount of time to wait before timing out, expressed
+                  in milliseconds.
+                </para>
+                
+                <note>
+                  <para>
+                    The <replaceable>timeout</replaceable> must be an
+                    even multiple of 1000 &mdash; that is, it must be
+                    equivalent to an integral number of seconds.
+                    Fractional seconds are not supported.
+                  </para>
+                </note>
+              </listitem>
+            </itemizedlist>
+            
+          </para>
+          
+        </formalpara>
+        
+        <formalpara>
+          
+          <title>Return Value</title>
+          
+          <para>
+            Returns <literal>0</literal> on success, with any other
+            value representing failure.
+          </para>
+          
+        </formalpara>
 
+<!--
+        <formalpara>
+          
+          <title>Example</title>
+          
+          <para>
+            <programlisting>
+[<emphasis>To be supplied...</emphasis>]
+</programlisting>
+          </para>
+          
+        </formalpara>
+-->        
+      </section>
+
       <section id="ndb-mgm-connect">
 
         <title><literal>ndb_mgm_connect()</literal></title>


Modified: trunk/ndbapi/mgm-function-template.xml
===================================================================
--- trunk/ndbapi/mgm-function-template.xml	2007-05-10 12:47:00 UTC (rev 6415)
+++ trunk/ndbapi/mgm-function-template.xml	2007-05-10 12:58:45 UTC (rev 6416)
Changed blocks: 1, Lines Added: 1, Lines Deleted: 1; 486 bytes

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE section SYSTEM "http://www.docbook.org/xml/4.3/docbookx.dtd">
-<section id="mgm-api-">
+<section id="ndb-mgm-">
 
   <title><literal>()</literal></title>
   


Modified: trunk/refman-5.1/news-5.1.xml
===================================================================
--- trunk/refman-5.1/news-5.1.xml	2007-05-10 12:47:00 UTC (rev 6415)
+++ trunk/refman-5.1/news-5.1.xml	2007-05-10 12:58:45 UTC (rev 6416)
Changed blocks: 1, Lines Added: 18, Lines Deleted: 0; 1094 bytes

@@ -169,6 +169,24 @@
           <filename>master.info</filename> file. (Bug #19991)
         </para>
       </listitem>
+      
+      <listitem>
+        <para>
+          <literal>NDB Cluster</literal> (APIs): The MGM API now
+          supports explicit setting of network timeouts using the
+          <literal>ndb_mgm_set_timeout()</literal> function. A utility
+          function
+          <literal>ndb_mgm_number_of_mgmd_in_connect_string()</literal>
+          is also implemented to facilitate calculation of timeouts
+          based on the number of management servers in the cluster.
+        </para>
+        
+        <para>
+          For more information, see 
+          <xref linkend="ndb-mgm-set-timeout"/>, and 
+          <xref linkend="ndb-mgm-number-of-mgmd-in-connect-string"/>.
+        </para>
+      </listitem>
 
       <listitem>
         <para>


Thread
svn commit - mysqldoc@docsrva: r6416 - in trunk: ndbapi refman-5.1jon10 May