Переглянути джерело

HPCC-9535 Rationalize Roxie topology info

Non-default multicast addresses were not working

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 12 роки тому
батько
коміт
9d54d96615
1 змінених файлів з 16 додано та 13 видалено
  1. 16 13
      roxie/ccd/ccdmain.cpp

+ 16 - 13
roxie/ccd/ccdmain.cpp

@@ -836,6 +836,20 @@ int STARTQUERY_API start_query(int argc, const char *argv[])
         if (myNodeIndex == -1)
             throw MakeStringException(MSGAUD_operator, ROXIE_INVALID_TOPOLOGY, "Invalid topology file - current node is not in server list");
 
+        // Set multicast base addresses - must be done before generating slave channels
+
+        if (roxieMulticastEnabled && !localSlave)
+        {
+            if (topology->queryProp("@multicastBase"))
+                multicastBase.ipset(topology->queryProp("@multicastBase"));
+            else
+                throw MakeStringException(MSGAUD_operator, ROXIE_INVALID_TOPOLOGY, "Invalid topology file - multicastBase not set");
+            if (topology->queryProp("@multicastLast"))
+                multicastLast.ipset(topology->queryProp("@multicastLast"));
+            else
+                throw MakeStringException(MSGAUD_operator, ROXIE_INVALID_TOPOLOGY, "Invalid topology file - multicastLast not set");
+        }
+
         // Generate the slave channels
         unsigned numDataCopies = topology->getPropInt("@numDataCopies", 1);
         unsigned numNodes = getNumNodes();
@@ -885,21 +899,10 @@ int STARTQUERY_API start_query(int argc, const char *argv[])
                     channel = 1;
             }
         }
+        // Now we know all the channels, we can open and subscribe the multicast channels
         if (!localSlave)
-        {
-            if (roxieMulticastEnabled)
-            {
-                if (topology->queryProp("@multicastBase"))
-                    multicastBase.ipset(topology->queryProp("@multicastBase"));
-                else
-                    throw MakeStringException(MSGAUD_operator, ROXIE_INVALID_TOPOLOGY, "Invalid topology file - multicastBase not set");
-                if (topology->queryProp("@multicastLast"))
-                    multicastLast.ipset(topology->queryProp("@multicastLast"));
-                else
-                    throw MakeStringException(MSGAUD_operator, ROXIE_INVALID_TOPOLOGY, "Invalid topology file - multicastLast not set");
-            }
             openMulticastSocket();
-        }
+
         setDaliServixSocketCaching(true);  // enable daliservix caching
         loadPlugins();
         globalPackageSetManager = createRoxiePackageSetManager(standAloneDll.getClear());