소스 검색

Merge pull request #8601 from richardkchapman/dali-cass-init

HPCC-14420 Dali should initialize cassandra data store

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>
Gavin Halliday 9 년 전
부모
커밋
349ff7f235
1개의 변경된 파일12개의 추가작업 그리고 6개의 파일을 삭제
  1. 12 6
      dali/base/dasds.cpp

+ 12 - 6
dali/base/dasds.cpp

@@ -6020,13 +6020,19 @@ void CCovenSDSManager::loadStore(const char *storeName, const bool *abort)
             assertex(thisDali);
             IPropertyTree *thisDaliInfo = findDaliProcess(envTree, thisDali->queryMyNode()->endpoint());
             assertex(thisDaliInfo);
-            Owned<IPropertyTreeIterator> plugins = thisDaliInfo->getElements("Plugin");
-            ForEach(*plugins)
+
+            const char *daliName = thisDaliInfo->queryProp("@name");
+            if (daliName)
             {
-                Owned<IPluggableFactory> factory = loadPlugin(&plugins->query());
-                assertex (factory);
-                if (!factory->initializeStore())
-                    throw MakeStringException(0, "Failed to initialize plugin store '%s'", plugins->query().queryProp("@name"));
+                VStringBuffer xpath("Software/DaliServerPlugin[@daliServers='%s']", daliName);
+                Owned<IPropertyTreeIterator> plugins = envTree->getElements(xpath);
+                ForEach(*plugins)
+                {
+                    Owned<IPluggableFactory> factory = loadPlugin(&plugins->query());
+                    assertex (factory);
+                    if (!factory->initializeStore())
+                        throw MakeStringException(0, "Failed to initialize plugin store '%s'", plugins->query().queryProp("@type"));
+                }
             }
 
             oldEnvironment.setown(root->getPropTree("Environment"));