List:Commits« Previous MessageNext Message »
From:Sivert Sorumgard Date:September 25 2012 1:01pm
Subject:bzr push into mysql-5.5-cluster-7.2 branch (sivert.sorumgaard:4077 to 4078)
View as plain text  
 4078 Sivert Sorumgard	2012-09-25
      Include NoOfReplicas in mcc. Set to 1 if uneven number of data nodes, otherwise 2

    modified:
      storage/ndb/mcc/frontend/js/mcc/configuration/calculations.js
      storage/ndb/mcc/frontend/js/mcc/configuration/deploy.js
      storage/ndb/mcc/frontend/js/mcc/configuration/parameters.js
 4077 Dyre Tjeldvoll	2012-09-25
      Fix typo

    modified:
      storage/ndb/mcc/setup-debug.bat.in
=== modified file 'storage/ndb/mcc/frontend/js/mcc/configuration/calculations.js'

=== modified file 'storage/ndb/mcc/frontend/js/mcc/configuration/calculations.js'
--- a/storage/ndb/mcc/frontend/js/mcc/configuration/calculations.js	2012-09-20 13:01:51 +0000
+++ b/storage/ndb/mcc/frontend/js/mcc/configuration/calculations.js	2012-09-25 13:01:00 +0000
@@ -420,7 +420,13 @@
                             "NoOfFragmentLogFiles", "defaultValueType", 
                             noOfFiles);
 
-                    waitCondition.resolve();
+		    // Get number of data nodes
+		    mcc.util.getNodeDistribution().then(function (nNodes) {
+                        mcc.configuration.setPara(processtype, null, 
+                                "NoOfReplicas", "defaultValueType", 
+                                2 - (nNodes['ndbd'] + nNodes['ndbmtd']) % 2);
+			waitCondition.resolve();
+		    });
                 });
             });
         });

=== modified file 'storage/ndb/mcc/frontend/js/mcc/configuration/deploy.js'
--- a/storage/ndb/mcc/frontend/js/mcc/configuration/deploy.js	2012-09-20 13:01:51 +0000
+++ b/storage/ndb/mcc/frontend/js/mcc/configuration/deploy.js	2012-09-25 13:01:00 +0000
@@ -245,6 +245,14 @@
         processesOnHost[processes[p].getValue("host")].push(processes[p]);
     }
 
+    // Alert if NoOfReplicas==2 for an odd number of data nodes
+    var noOfReplicas = getEffectiveTypeValue(processFamilyMap['data'], 'NoOfReplicas');
+    if (processFamilyInstances('data').length % 2 == 1 && noOfReplicas == 2) {
+	alert("With an uneven number of data nodes, the number of replicas " +
+	      "(NoOfReplicas) must be set to 1");
+	return false;
+    }
+
     // Do verification for each host individually
     for (var h in hosts) {
         var dirs = [];

=== modified file 'storage/ndb/mcc/frontend/js/mcc/configuration/parameters.js'
--- a/storage/ndb/mcc/frontend/js/mcc/configuration/parameters.js	2012-09-20 13:01:51 +0000
+++ b/storage/ndb/mcc/frontend/js/mcc/configuration/parameters.js	2012-09-25 13:01:00 +0000
@@ -534,6 +534,25 @@
                 visibleInstance: false,
                 advancedLevel: true
             },
+            NoOfReplicas: {
+                label: "NoOfReplicas",
+                docurl: "http://dev.mysql.com/doc/refman/5.5/en/mysql-cluster" +
+                    "-ndbd-definition.html#ndbparam-ndbd-noofreplicas", 
+                tooltip: "Number of copies of all data in the database (1-4)",
+                constraints: {min: 1, max: 2, places: 0, pattern: "#"},
+                attribute: "NoOfReplicas",
+                destination: "config.ini",
+                overridableType: false,
+                overridableInstance: false,
+                widget: dijit.form.NumberSpinner,
+                width: "50%",
+                defaultValueType: 2,
+                defaultValueInstance: [],
+                visibleType: true,
+                visibleInstance: false,
+                advancedLevel: true,
+                simpleCfg: true
+            },
             StringMemory: {
                 label: "StringMemory",
                 docurl: "http://dev.mysql.com/doc/refman/5.5/en/mysql-cluster" +
@@ -1177,7 +1196,9 @@
 function visiblePara(dest, appArea, family, param) {
     if (appArea == "simple testing") {
         return !mcc.configuration.getPara(family, null, 
-                param, "advancedLevel");
+                param, "advancedLevel") ||
+	    (dest == "cfg" && mcc.configuration.getPara(family, null, 
+                param, "simpleCfg"));
     } else if (dest == "cfg") {
         return true;
     } else if (dest == "gui") {

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.5-cluster-7.2 branch (sivert.sorumgaard:4077 to 4078) Sivert Sorumgard26 Sep