Skip to content

Commit

Permalink
HPCC-29923 Avoid CRowServer cancel if not running
Browse files Browse the repository at this point in the history
This avoids an inherent delay being introduced by the MP layer.

CRowServer is used by Global Group, Global TopN and a refactoring
form of IndexWrite (where is merges down to less parts).

Signed-off-by: Jake Smith <[email protected]>
  • Loading branch information
jakesmith committed Jul 12, 2023
1 parent 242ab8d commit beba95a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions thorlcr/thorutil/thormisc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1371,8 +1371,12 @@ class CRowServer : public CSimpleInterface, implements IThreaded, implements IRo
#ifdef TRACE_GLOBAL_GROUP
ActPrintLog(activity, "%s", __func__);
#endif
running = false;
comm.cancel(RANK_ALL, mpTag);
bool wanted = true;
if (running.compare_exchange_strong(wanted, false))
{
running = false;
comm.cancel(RANK_ALL, mpTag);
}
}
};

Expand Down

0 comments on commit beba95a

Please sign in to comment.