Pārlūkot izejas kodu

Merge branch 'candidate-7.4.x' into candidate-7.6.x

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 5 gadi atpakaļ
vecāks
revīzija
41e2a93c35

+ 4 - 0
CMakeLists.txt

@@ -508,4 +508,8 @@ configure_file(
 add_custom_target(uninstall
     COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
 
+add_custom_target(localinstall
+	COMMAND $(MAKE) install
+    )
+
 include(CPack)

+ 8 - 10
dali/ft/filecopy.cpp

@@ -1087,17 +1087,15 @@ void FileSprayer::calculateMany2OnePartition()
     const char *partSeparator = srcFormat.getPartSeparatorString();
     offset_t partSeparatorLength = ( partSeparator == nullptr ? 0 : strlen(partSeparator));
     offset_t lastContentLength = 0;
-    offset_t contentLength = 0;
     ForEachItemIn(idx, sources)
     {
         FilePartInfo & cur = sources.item(idx);
         RemoteFilename curFilename;
         curFilename.set(cur.filename);
         setCanAccessDirectly(curFilename);
-        if (partSeparator)
+        if (cur.size)
         {
-            contentLength = (cur.size > cur.xmlHeaderLength + cur.xmlFooterLength  + partSeparatorLength ? cur.size - cur.xmlHeaderLength - cur.xmlFooterLength - partSeparatorLength : 0);
-            if (contentLength)
+            if (partSeparator)
             {
                 if (lastContentLength)
                 {
@@ -1105,14 +1103,10 @@ void FileSprayer::calculateMany2OnePartition()
                     part.whichOutput = 0;
                     partition.append(part);
                 }
-                lastContentLength = contentLength;
+                lastContentLength = cur.size;
             }
-        }
-        else
-            contentLength = (cur.size > cur.headerSize ? cur.size - cur.headerSize : 0);
-
-        if (contentLength)
             partition.append(*new PartitionPoint(idx, 0, cur.headerSize, cur.size, cur.size));
+        }
     }
 
     if (srcFormat.isCsv())
@@ -1616,7 +1610,11 @@ void FileSprayer::analyseFileHeaders(bool setcurheadersize)
                 }
                 cur.headerSize += (unsigned)cur.xmlHeaderLength;
                 if (cur.size >= cur.xmlHeaderLength + cur.xmlFooterLength)
+                {
                     cur.size -= (cur.xmlHeaderLength + cur.xmlFooterLength);
+                    if (cur.size <= srcFormat.rowTag.length()) // implies there's a header and footer but no rows (whitespace only)
+                        cur.size = 0;
+                }
                 else
                     throwError3(DFTERR_InvalidXmlPartSize, cur.size, cur.xmlHeaderLength, cur.xmlFooterLength);
             }

+ 4 - 0
thorlcr/activities/lookupjoin/thlookupjoinslave.cpp

@@ -2788,11 +2788,15 @@ public:
 
             if (rhsDistributor)
             {
+                // NB: if rhsDistributor is in use, its stream is already consumed by processDistRight()
                 rhsDistributor->disconnect(true);
                 rhsDistributor->join();
             }
             if (lhsDistributor)
             {
+                // If LHS distributor is in use, must signal stop to ensure distributor doesn't stall in receiver
+                if (left)
+                    left->stop();
                 lhsDistributor->disconnect(true);
                 lhsDistributor->join();
             }