Browse Source

Merge branch 'candidate-7.8.x' into candidate-7.10.x

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 4 years ago
parent
commit
5c65a69a9c
3 changed files with 10 additions and 3 deletions
  1. 5 2
      roxie/ccd/ccdserver.cpp
  2. 1 0
      system/jlib/jthread.cpp
  3. 4 1
      testing/regress/ecl/issue23168.ecl

+ 5 - 2
roxie/ccd/ccdserver.cpp

@@ -21806,12 +21806,15 @@ public:
 
     virtual IRoxieServerActivity *createActivity(IRoxieAgentContext *_ctx, IProbeManager *_probeManager) const
     {
-        return new CRoxieServerRemoteResultActivity(_ctx, this, _probeManager, usageCount);
+        if (dependentCount==0 && !CRoxieServerInternalSinkFactory::isSink())
+            return new CRoxieServerNullSinkActivity(_ctx, this, _probeManager);
+        else
+            return new CRoxieServerRemoteResultActivity(_ctx, this, _probeManager, usageCount);
     }
 
     virtual bool isSink() const override
     {
-        return CRoxieServerInternalSinkFactory::isSink() || dependentCount == 0;  // Codegen normally optimizes these away, but if it doesn't we need to treat as a sink rather than a dependency or upstream activities are not stopped properly
+        return CRoxieServerInternalSinkFactory::isSink() || dependentCount == 0;  // Codegen normally optimizes these away, but if it doesn't we need to treat as a (null) sink rather than a dependency or upstream activities are not stopped properly
     }
 
 };

+ 1 - 0
system/jlib/jthread.cpp

@@ -2406,6 +2406,7 @@ public:
                 PROGLOG("%s: Pipe Aborting",title.get());
             aborted = true;
             closeInput();
+            if (forkthread)
             {
                 CriticalUnblock unblock(sect);
                 forkthread->join(1000);

+ 4 - 1
testing/regress/ecl/issue23168.ecl

@@ -15,6 +15,8 @@
     limitations under the License.
 ############################################################################## */
 
+//nothor
+
 import dbglog from Std.System.log;
 
 namesRecord :=
@@ -27,8 +29,9 @@ names2 := DEDUP(NOCOMBINE(DATASET([{1,'Gavin'},{2,'Bill'},{3,'John'},{4,'Gerald'
 names1 := DEDUP(NOCOMBINE(DATASET([{1,'Oscar'},{2,'Charles'},{3,'Freddie'},{4,'Winifred'},{5,'Bouncer'}], namesRecord)), id);
 
 s := nofold(sort(names2, name));
+s2 := LIMIT(s, 1);
 
-j := join(names1, s, left.id = right.id, transform(namesRecord, self.id := left.id + s[2].id; self.name := right.name), left outer, keep(1));
+j := join(names1, s, left.id = right.id, transform(namesRecord, self.id := left.id + s2[2].id; self.name := right.name), left outer, keep(1));
 
 output(names2);
 dbglog('Hello ' + (string)names2[3].name + ' and ' + (string)count(j) + 'again');