Sfoglia il codice sorgente

Merge branch 'candidate-4.2.12' into candidate-5.0.4

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 10 anni fa
parent
commit
f843fb7e70
2 ha cambiato i file con 14 aggiunte e 9 eliminazioni
  1. 13 8
      common/workunit/workunit.cpp
  2. 1 1
      version.cmake

+ 13 - 8
common/workunit/workunit.cpp

@@ -245,11 +245,9 @@ public:
         rootPath.append("/GraphProgress/").append(wuid).append('/').append(graphName).append('/');
         connected = connectedWrite = false;
         formatVersion = 0;
-        progress = NULL;
     }
-    CConstGraphProgress(const char *_wuid, const char *_graphName, IPropertyTree *allProgress) : wuid(_wuid), graphName(_graphName)
+    CConstGraphProgress(const char *_wuid, const char *_graphName, IPropertyTree *_progress) : wuid(_wuid), graphName(_graphName), progress(_progress)
     {
-        progress = allProgress->queryPropTree(graphName);
         formatVersion = progress->getPropInt("@format");
         connectedWrite = false; // should never be
         connected = true;
@@ -260,7 +258,7 @@ public:
         packProgress(wuid,false);
         conn.setown(querySDS().connect(rootPath.str(), myProcessSession(), RTM_LOCK_READ|RTM_CREATE_QUERY, SDS_LOCK_TIMEOUT));
 
-        progress = conn->queryRoot();
+        progress.set(conn->queryRoot());
         formatVersion = progress->getPropInt("@format");
         connected = true;
     }
@@ -275,7 +273,7 @@ public:
         else
             packProgress(wuid,false);
         conn.setown(querySDS().connect(rootPath.str(), myProcessSession(), RTM_LOCK_WRITE|RTM_CREATE_QUERY, SDS_LOCK_TIMEOUT));
-        progress = conn->queryRoot();
+        progress.set(conn->queryRoot());
         if (!progress->hasChildren()) // i.e. blank.
         {
             formatVersion = PROGRESS_FORMAT_V;
@@ -415,7 +413,7 @@ public:
 
 private:
     Owned<IRemoteConnection> conn;
-    IPropertyTree* progress;
+    Linked<IPropertyTree> progress;
     StringAttr wuid, graphName;
     StringBuffer rootPath;
     bool connected, connectedWrite;
@@ -6908,7 +6906,6 @@ IConstWUGraphMetaIterator& CLocalWorkUnit::getGraphsMeta(WUGraphType type) const
         Owned<IConstWUGraphIterator> graphIter;
         IConstWUGraph *curGraph;
         Owned<IConstWUGraphProgress> curGraphProgress;
-        Linked<IPropertyTree> graphProgress;
         Owned<IRemoteConnection> progressConn;
         bool match()
         {
@@ -6921,7 +6918,15 @@ IConstWUGraphMetaIterator& CLocalWorkUnit::getGraphsMeta(WUGraphType type) const
             SCMStringBuffer graphName;
             curGraph->getName(graphName);
             if (progressConn)
-                curGraphProgress.setown(new CConstGraphProgress(wuid, graphName.str(), progressConn->queryRoot()));
+            {
+                IPropertyTree *progress = progressConn->queryRoot()->queryPropTree(graphName.str());
+                if (progress)
+                {
+                    curGraphProgress.setown(new CConstGraphProgress(wuid, graphName.str(), progress));
+                    return;
+                }
+            }
+            curGraphProgress.clear();
         }
     public:
         IMPLEMENT_IINTERFACE;

+ 1 - 1
version.cmake

@@ -6,5 +6,5 @@ set ( HPCC_MAJOR 5 )
 set ( HPCC_MINOR 0 )
 set ( HPCC_POINT 4 )
 set ( HPCC_MATURITY "rc" )
-set ( HPCC_SEQUENCE 3 )
+set ( HPCC_SEQUENCE 4 )
 ###