Skip to content

Commit

Permalink
HPCC-32093 Add test option to debug rogue SORT clients
Browse files Browse the repository at this point in the history
Signed-off-by: Jake Smith <[email protected]>
  • Loading branch information
jakesmith committed Jun 19, 2024
1 parent 5665dd8 commit 4f1f8e5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions thorlcr/msort/tsorts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1067,6 +1067,18 @@ class CThorSorter : public CSimpleInterface, implements IThorSorter, implements
}
virtual void MultiMergeBetween(rowcount_t _globalCount, unsigned mapsize, rowcount_t * map, rowcount_t * mapupper, unsigned num, SocketEndpoint * endpoints)
{
unsigned blockSortConnectActId = activity->getOptInt("blockSortConnectActId");
if (blockSortConnectActId == activity->queryContainer().queryId())
{
// NB: this is a testing option, see HPCC-xxxx for more detail
// This will prevent the sort from proceeding and connecting to the accept()'s on the other side.
DBGLOG("Blocking in MultiMergeBetween, blocking sort connect");
bool held = true;
while (held)
{
MilliSleep(30000);
}
}
assertex(transferserver.get()!=NULL);
globalCount = _globalCount;
if (intercept)
Expand Down

0 comments on commit 4f1f8e5

Please sign in to comment.