Skip to content

Commit 6850c98

Browse files
authored
Merge pull request #21050 from ghalliday/issue35890
HPCC-35890 Fix problem with ordered stranding triggering premature eof Reviewed-By: Dan S. Camper <dan.camper@lexisnexisrisk.com> Merged-by: Gavin Halliday <gavin.halliday@lexisnexisrisk.com>
2 parents 538c9ad + 6942bf3 commit 6850c98

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

common/thorhelper/thorstrand.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ RoxieRowBlock::~RoxieRowBlock()
219219

220220
bool RoxieRowBlock::empty() const
221221
{
222-
return (readPos >= writePos) && !exception;
222+
return (readPos >= writePos) && !exception && !endOfChunk;
223223
}
224224

225225
bool RoxieRowBlock::readFromStream(IRowStream * stream)
@@ -727,8 +727,9 @@ class OrderedManyToOneJunction : public CStrandJunction, implements IEngineRowSt
727727
public:
728728
IMPLEMENT_IINTERFACE_USING(CStrandJunction)
729729

730+
//NOTE: Pass blockSize+1 to the allocator, so that the endOfChunk can fit in the same block as the rows.
730731
OrderedManyToOneJunction(roxiemem::IRowManager & _rowManager, unsigned _numStrands, unsigned blockSize)
731-
: CStrandJunction(_numStrands, _numStrands), allocator(_rowManager, blockSize)
732+
: CStrandJunction(_numStrands, _numStrands), allocator(_rowManager, blockSize+1)
732733
{
733734
producers = new OrderedReadAheadThread * [numStrands];
734735
for (unsigned i=0; i < numStrands; i++)

0 commit comments

Comments
 (0)