Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HPCC-32759 Fix deadlock in unordered concat activity with rows > 2MB #19287

Merged
merged 1 commit into from
Nov 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions thorlcr/activities/funnel/thfunnelslave.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,22 @@ class CParallelFunnel : implements IRowStream, public CSimpleInterface
}
void informEos(unsigned input)
{
CriticalBlock b(crit);
eoss++;
if (eoss == inputHandlers.ordinality())
rows.enqueue(NULL);
unsigned numToSignal = 0;
{
CriticalBlock b(crit);
eoss++;
if (eoss == inputHandlers.ordinality())
rows.enqueue(NULL);
// If the row sizes are very large then it is possible that other threads are waiting
// signal one of them that it can continue - because this thread will add no more records (HPCC-32759)
if (waiting && (totSize <= FUNNEL_MIN_BUFF_SIZE))
{
numToSignal = 1;
waiting--;
}
}
if (numToSignal)
fullSem.signal(numToSignal);
}
void abort()
{
Expand Down
Loading