Browse Source

Merge branch 'candidate-7.0.x' into candidate-7.2.x

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 6 years ago
parent
commit
d5e61bb2a8

+ 8 - 2
dali/base/dadfs.cpp

@@ -4135,10 +4135,16 @@ public:
         char psc = getPathSepChar(directory.get());
         DFD_OS os = SepCharBaseOs(psc);
         StringBuffer basedir;
+
+        const char *myBase;
         if (newbasedir)
+        {
             diroverride = newbasedir;
+            myBase = newbasedir;
+        }
+        else
+            myBase = queryBaseDirectory(grp_unknown, 0, os);
 
-        const char *myBase = queryBaseDirectory(grp_unknown, 0, os);
         StringBuffer baseDir, newPath;
         makePhysicalPartName(logicalName.get(), 0, 0, newPath, false, os, diroverride);
         if (!getBase(directory, newPath, baseDir))
@@ -6024,7 +6030,7 @@ public:
             const char *curKind = file.queryAttributes().queryProp("@kind");
             if (!kind)
                 kind = curKind;
-            else if (!streq(kind, curKind))
+            else if (!strsame(kind, curKind))
             {
                 kind = nullptr;
                 break;

+ 0 - 4
esp/bindings/http/client/httpclient.cpp

@@ -624,10 +624,6 @@ HttpClientErrCode CHttpClient::sendRequest(IProperties *headers, const char* met
         JBASE64_Encode(uidpair.str(), uidpair.length(), result, false);
         StringBuffer authhdr("Basic ");
 
-        //Remove the \n from the end of the encoded string.
-        //Should it even be there??
-        result.setCharAt(result.length() - 1,0);
-
         authhdr.append(result.str());
         httprequest->addHeader("Authorization", authhdr.str());
     }

+ 6 - 2
esp/logging/logginglib/logthread.cpp

@@ -408,8 +408,12 @@ void CLogThread::writeJobQueue(IEspUpdateLogRequestWrap* jobToWrite)
 
 IEspUpdateLogRequestWrap* CLogThread::readJobQueue()
 {
-    unsigned startTime = (getEspLogLevel()>=LogNormal) ? msTick() : 0;
+#define LOG_LEVEL LogNormal
+    unsigned startTime = (getEspLogLevel()>=LOG_LEVEL) ? msTick() : 0;
     CriticalBlock b(logQueueCrit);
-    ESPLOG(LogNormal, "LThread:waitRQ: %dms\n", msTick() -  startTime);
+    unsigned delta = (getEspLogLevel()>=LOG_LEVEL) ? msTick() - startTime : 0;
+    if (delta > 1) // <=1ms is not indicative of an unexpected delay
+        ESPLOG(LOG_LEVEL, "LThread:waitRQ: %dms", delta);
     return (IEspUpdateLogRequestWrap*)logQueue.dequeue();
+#undef LOG_LEVEL
 }

+ 4 - 1
esp/services/esdl_svc_engine/esdl_binding.cpp

@@ -278,7 +278,10 @@ void EsdlServiceImpl::configureUrlMethod(const char *method, IPropertyTree &entr
     EsdlBindingImpl::splitURLList(url, protocol, name, pw, iplist, path, ops);
 
     entry.setProp("@prot", protocol);
-    entry.setProp("@path", path);
+    // Setting the path here overrides any existing path attribute value. Only do it when
+    // the url attribute explicitly includes a non-empty value.
+    if (path.length() > 0 && !streq(path, "/"))
+        entry.setProp("@path", path);
 
     try
     {

+ 1 - 1
esp/services/ws_workunits/ws_workunitsHelpers.cpp

@@ -728,7 +728,7 @@ bool WsWuInfo::hasSubGraphTimings()
 {
     try
     {
-        WuScopeFilter filter("stype[subgraph],props[stat]");
+        WuScopeFilter filter("depth[3],stype[subgraph],stat[TimeElapsed],nested[0]");
         Owned<IConstWUScopeIterator> it = &cw->getScopeIterator(filter);
         ForEach(*it)
         {

+ 2 - 1
esp/src/eclwatch/JSGraphWidget.js

@@ -91,7 +91,8 @@ define([
                     ;
                 this.layout = new hpccLayout.Layered()
                     .target(domNode.id)
-                    .widgets([this.messageWidget, this.graphWidget])
+                    .addLayer(this.messageWidget)
+                    .addLayer(this.graphWidget)
                     .render()
                     ;
                 this._options = {};

+ 5 - 0
esp/src/eclwatch/WUDetailsWidget.js

@@ -121,6 +121,7 @@ define([
                 this.includeSlaveLogsCheckbox = registry.byId(this.id + "IncludeSlaveLogsCheckbox");
                 this.logsForm = registry.byId(this.id + "LogsForm");
                 this.allowOnlyNumber = registry.byId(this.id + "AllowOnlyNumber");
+                this.protected = registry.byId(this.id + "Protected");
 
                 this.infoGridWidget = registry.byId(this.id + "InfoContainer");
                 this.zapDialog = registry.byId(this.id + "ZapDialog");
@@ -287,6 +288,10 @@ define([
                     .wuid(params.Wuid)
                     .lazyRender()
                     ;
+
+                this.protected.on("change", function(evt){
+                    context._onSave();
+                })
             },
 
             initTab: function () {

+ 13 - 5
esp/src/src/ESPWorkunit.ts

@@ -264,11 +264,19 @@ var Workunit = declare([ESPUtil.Singleton, ESPUtil.Monitor], {  // jshint ignore
         var context = this;
         WsWorkunits.WUCreate({
             load: function (response) {
-                _workunits[response.WUCreateResponse.Workunit.Wuid] = context;
-                context.Wuid = response.WUCreateResponse.Workunit.Wuid;
-                context.startMonitor(true);
-                context.updateData(response.WUCreateResponse.Workunit);
-                context.onCreate();
+                if (lang.exists("Exceptions.Exception", response)) {
+                    dojo.publish("hpcc/brToaster", {
+                        message: "<h4>" + response.Exceptions.Source + "</h4>" + "<p>" + response.Exceptions.Exception[0].Message + "</p>",
+                        type: "error",
+                        duration: -1
+                    });
+                } else {
+                    _workunits[response.WUCreateResponse.Workunit.Wuid] = context;
+                    context.Wuid = response.WUCreateResponse.Workunit.Wuid;
+                    context.startMonitor(true);
+                    context.updateData(response.WUCreateResponse.Workunit);
+                    context.onCreate();
+                }
             }
         });
     },

+ 2 - 2
plugins/spark/CMakeLists.txt

@@ -59,7 +59,7 @@ if(SPARK)
 
     if(NOT SPARK_HPCC_JAR)
         if(NOT SPARK_HPCC_VERSION)
-            set(SPARK_HPCC_VERSION "7.0.0")
+            set(SPARK_HPCC_VERSION "7.0.2")
         endif()
         file(DOWNLOAD
             ${CENTRAL_REPO}/org/hpccsystems/spark-hpcc/${SPARK_HPCC_VERSION}/spark-hpcc-${SPARK_HPCC_VERSION}.jar
@@ -71,7 +71,7 @@ if(SPARK)
 
     if(NOT WSCLIENT_JAR)    
         if(NOT WSCLIENT_VERSION)
-            set(WSCLIENT_VERSION "7.0.0")
+            set(WSCLIENT_VERSION "7.0.2")
         endif()
         file(DOWNLOAD
             ${CENTRAL_REPO}/org/hpccsystems/wsclient/${WSCLIENT_VERSION}/wsclient-${WSCLIENT_VERSION}-jar-with-dependencies.jar

+ 2 - 2
system/jlib/jfile.cpp

@@ -299,7 +299,7 @@ bool WindowsCreateDirectory(const char * path)
         if (CreateDirectory(path, NULL))
             return true;
         DWORD err = GetLastError();
-        if ((err==ERROR_FILE_NOT_FOUND) || (err==ERROR_PATH_NOT_FOUND) || (err==ERROR_FILE_EXISTS) || (err==ERROR_CANNOT_MAKE))
+        if ((err==ERROR_FILE_NOT_FOUND) || (err==ERROR_PATH_NOT_FOUND) || (err==ERROR_FILE_EXISTS) || (err==ERROR_CANNOT_MAKE) || (err==ERROR_ACCESS_DENIED))
             break;
         else if (err==ERROR_ALREADY_EXISTS) {
             DWORD attr = GetFileAttributes(path);
@@ -310,7 +310,7 @@ bool WindowsCreateDirectory(const char * path)
         if ((retry++==10)||  // some or all of the following can occur when the domain controller gets busy
                              // retrying improves chance of success
             ((err!=ERROR_NETNAME_DELETED)&&(err!=ERROR_DEV_NOT_EXIST)&&(err!=ERROR_GEN_FAILURE)&&(err!=ERROR_NETWORK_BUSY)&&(err!=ERROR_BAD_NET_NAME))) 
-            throw makeOsExceptionV(err,"WindowsCreateDirectory %s", path);
+            return false;
         //PROGLOG("Retrying(%d) WindowsCreateDirectory %s, err=%d",retry,filename,err);
         Sleep(retry*100); 
     }

+ 3 - 4
thorlcr/activities/indexread/thindexreadslave.cpp

@@ -743,13 +743,12 @@ public:
         if (!helper->transformMayFilter() && !helper->hasMatchFilter())
         {
             if (choosenLimit)
-            {
                 remoteLimit = choosenLimit;
-                if ((RCMAX != keyedLimit) && (keyedLimit+1 < remoteLimit))
-                    remoteLimit = keyedLimit+1; // 1 more to ensure triggered when received back.
-            }
         }
 
+        if ((RCMAX != keyedLimit) && (keyedLimit+1 < remoteLimit))
+            remoteLimit = keyedLimit+1; // 1 more to ensure triggered when received back.
+
         if ((keyedLimit != RCMAX && (keyedLimitSkips || (helper->getFlags() & TIRcountkeyedlimit) != 0)))
             keyedLimitCount = getCount(keyedLimit, true);