Selaa lähdekoodia

Merge pull request #9468 from richardkchapman/join-row-leak

HPCC-16832 JOIN in roxie may leak rows if not consumed entirely

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>
Gavin Halliday 8 vuotta sitten
vanhempi
commit
74825be3fa
1 muutettua tiedostoa jossa 9 lisäystä ja 1 poistoa
  1. 9 1
      common/thorhelper/roxiehelper.cpp

+ 9 - 1
common/thorhelper/roxiehelper.cpp

@@ -527,7 +527,10 @@ public:
     {
         sorter->reset();
     }
-
+    ~SortedInputReader()
+    {
+        sorter->reset();
+    }
     virtual const void *nextRow()
     {
         if (!firstRead)
@@ -613,6 +616,11 @@ class CSortAlgorithm : implements CInterfaceOf<ISortAlgorithm>
 public:
     CSortAlgorithm() { elapsedCycles = 0; }
 
+    virtual void beforeDispose() override
+    {
+        reset();
+    }
+
     virtual void getSortedGroup(ConstPointerArray & result)
     {
         loop