Преглед изворни кода

Merge pull request #1864 from hpcc-systems/candidate-3.6.x

Merge latest 3.6.x fixes back into master

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>
Gavin Halliday пре 13 година
родитељ
комит
92d049ff7b

+ 4 - 3
VERSIONS

@@ -45,9 +45,10 @@ Branches with names starting candidate- contain code that is being prepared for
 release as a stable version. Fixes for bugs discovered during closedown testing
 will be merged into the current candidate- branch.
 
-A branch with the name split-X.Y will refer to the point at which the branch for
-candidate-X.Y split off from master. This is normally the point where bug fixes
-intended for release in the X.Y series should be based.
+When preparing a patch or a GitHub pull request, a new git branch should be created
+based on the appropriate target - if the change is to go into the next 3.6 build, then
+base it on candidate-3.6.x, for example. All changes that are accepted into candidate-3.6.x
+are normally merged into the master branch too.
 
 Tags
 ====

+ 0 - 1
dali/base/dadfs.cpp

@@ -8019,7 +8019,6 @@ public:
                     VStringBuffer xpath("Software/RoxieCluster[@name=\"%s\"]", cluster.queryProp("@name"));
                     oldCluster = oldEnvironment->queryPropTree(xpath.str());
                 }
-                force = true; // JCSMORE, roxie groups may only change on detected environment change in future?
                 constructGroup(cluster,NULL,oldCluster,grp_roxie,force,messages);
                 constructFarmGroup(clusters->query(),oldCluster,force,messages);
             }

+ 13 - 28
dali/dfuXRefLib/XRefFilesNode.cpp

@@ -141,22 +141,15 @@ static bool checkPartsInCluster(const char *title,const char *clustername, IProp
 
 
 
-bool CXRefFilesNode::RemovePhysical(const char* _Partmask,IUserDescriptor* udesc, const char *clustername, StringBuffer &errstr)
+bool CXRefFilesNode::RemovePhysical(const char *Partmask,IUserDescriptor* udesc, const char *clustername, StringBuffer &errstr)
 {   
     size32_t startlen = errstr.length();
-    IPropertyTree* subBranch = FindNode(_Partmask);
+    IPropertyTree* subBranch = FindNode(Partmask);
     if (!subBranch) {
-        ERRLOG("%s branch not found",_Partmask);
-        errstr.appendf("ERROR: %s branch not found",_Partmask);
+        ERRLOG("%s branch not found",Partmask);
+        errstr.appendf("ERROR: %s branch not found",Partmask);
         return false;
     }
-    const char *Partmask = _Partmask;
-    StringBuffer tmpmask; // expand driveless form
-    // No longer required?? TBD
-    if ((Partmask[0]=='/')&&Partmask[1]&&(Partmask[1]!='/')&&(Partmask[2]!='$')) 
-        Partmask = tmpmask.append("/c$").append(Partmask).str();
-    else if ((Partmask[0]=='\\')&&(Partmask[1]!='\\'))
-        Partmask = tmpmask.append("c:").append(Partmask).str();
     // sanity check file doesn't (now) exist 
     bool exists = false;
     StringBuffer lfn;
@@ -263,9 +256,9 @@ bool CXRefFilesNode::RemovePhysical(const char* _Partmask,IUserDescriptor* udesc
         }
     } afor(files,errstr,crit);  
     afor.For(files.ordinality(),10,false,true);
-    if (!RemoveTreeNode(_Partmask))                 
+    if (!RemoveTreeNode(Partmask))                 
     {
-        ERRLOG("Error Removing XRef Branch %s",_Partmask);
+        ERRLOG("Error Removing XRef Branch %s",Partmask);
         return false;
     }
     m_bChanged = true;
@@ -302,22 +295,14 @@ bool CXRefFilesNode::RemoveLogical(const char* LogicalName,IUserDescriptor* udes
     return true;
 }
 
-bool CXRefFilesNode::AttachPhysical(const char* _Partmask,IUserDescriptor* udesc, const char *clustername, StringBuffer &errstr)
+bool CXRefFilesNode::AttachPhysical(const char *Partmask,IUserDescriptor* udesc, const char *clustername, StringBuffer &errstr)
 {
-    IPropertyTree* subBranch = FindNode(_Partmask);
+    IPropertyTree* subBranch = FindNode(Partmask);
     if (!subBranch) {
-        ERRLOG("%s node not found",_Partmask);
-        errstr.appendf("ERROR: %s node not found",_Partmask);
+        ERRLOG("%s node not found",Partmask);
+        errstr.appendf("ERROR: %s node not found",Partmask);
         return false;
     }
-    const char *Partmask = _Partmask;
-    StringBuffer tmpmask; // expand driveless form
-    // No longer required?? TBD
-    if ((Partmask[0]=='/')&&Partmask[1]&&(Partmask[1]!='/')&&(Partmask[2]!='$')) 
-        Partmask = tmpmask.append("/c$").append(Partmask).str();
-    else if ((Partmask[0]=='\\')&&(Partmask[1]!='\\'))
-        Partmask = tmpmask.append("c:").append(Partmask).str();
-
     if (!checkPartsInCluster(Partmask,clustername,subBranch,errstr,false))
         return false;
 
@@ -382,9 +367,9 @@ bool CXRefFilesNode::AttachPhysical(const char* _Partmask,IUserDescriptor* udesc
     Owned<IDistributedFile> dFile = queryDistributedFileDirectory().createNew(fileDesc);
     dFile->attach(logicalName.toCharArray(),udesc);
 
-    if (!RemoveTreeNode(_Partmask)) {                   
-        ERRLOG("Removing XRef Branch %s",_Partmask);
-        errstr.appendf("ERROR: Removing XRef Branch %s",_Partmask);
+    if (!RemoveTreeNode(Partmask)) {                   
+        ERRLOG("Removing XRef Branch %s",Partmask);
+        errstr.appendf("ERROR: Removing XRef Branch %s",Partmask);
         return false;
     }
     m_bChanged = true;

+ 6 - 1
roxie/ccd/ccddali.cpp

@@ -39,6 +39,7 @@ class CDaliPackageWatcher : public CInterface, implements ISDSSubscription, impl
     SubscriptionId change;
     ISDSSubscription *notifier;
     StringAttr id;
+    mutable CriticalSection crit;
 public:
     IMPLEMENT_IINTERFACE;
     CDaliPackageWatcher(const char *_id, const char *xpath, ISDSSubscription *_notifier)
@@ -52,6 +53,8 @@ public:
     }
     virtual void unsubscribe()
     {
+        CriticalBlock b(crit);
+        notifier = NULL;
         querySDS().unsubscribe(change);
     }
     virtual const char *queryName() const
@@ -60,7 +63,9 @@ public:
     }
     virtual void notify(SubscriptionId id, const char *xpath, SDSNotifyFlags flags, unsigned valueLen, const void *valueData)
     {
-        notifier->notify(id, xpath, flags, valueLen, valueData);
+        CriticalBlock b(crit);
+        if (notifier)
+            notifier->notify(id, xpath, flags, valueLen, valueData);
     }
 };
 

+ 0 - 1
roxie/ccd/ccdstate.cpp

@@ -597,7 +597,6 @@ class CPackageMap : public CInterface, implements IPackageMap
     MapStringToMyClass<IRoxiePackage> packages;
     StringAttr packageId;
     StringAttr querySetId;
-    Owned<IPropertyTree> querySets;
     bool active;
     StringArray wildMatches, wildIds;
 public:

+ 1 - 1
thorlcr/activities/hashdistrib/thhashdistribslave.cpp

@@ -2554,7 +2554,7 @@ public:
         helper = static_cast <IHThorHashAggregateArg *> (queryHelper());
         appendOutputLinked(this);
 
-        if (!container.queryLocal())
+        if (!container.queryLocalOrGrouped())
             mptag = container.queryJob().deserializeMPTag(data);
         ActPrintLog("HASHAGGREGATE: init tags %d",(int)mptag);
     }