Explorar o código

HPCC-23068 Prevent stall if failed over to local and early stop

If Smart Join has failed over to a local hash join, and is stopped
early, whilst still receiving rows via the LHS distributor, it
can stall.
Must ensure the LHS distributor stream is stopped.

Signed-off-by: Jake Smith <jake.smith@lexisnexisrisk.com>
Jake Smith %!s(int64=5) %!d(string=hai) anos
pai
achega
d93bf8b137
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      thorlcr/activities/lookupjoin/thlookupjoinslave.cpp

+ 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();
             }