Skip to content

Commit

Permalink
Merge pull request #18225 from ghalliday/issue31111
Browse files Browse the repository at this point in the history
HPCC-31111 Fix unusual roxie crash on keyed join within library

Reviewed-by: Mark Kelly [email protected]
Merged-by: Gavin Halliday <[email protected]>
  • Loading branch information
ghalliday authored Jan 16, 2024
2 parents 0ce4f3d + 7936c36 commit 43acc9b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions common/thorhelper/roxierow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -488,9 +488,12 @@ class CAllocatorCache : public CSimpleInterfaceOf<IRowAllocatorMetaActIdCache>
CAllocatorCacheItem *container = _lookup(meta, activityId, flags);
if (container)
{
if (0 == (roxiemem::RHFunique & flags))
if (0 == ((roxiemem::RHFunique|roxiemem::RHFblocked) & flags))
return LINK(&container->queryElement());
// if in cache but unique, reuse allocatorId
// If in cache but unique, reuse allocatorId, but create a unique allocator (and heap)
// If blocked the allocator must not be commoned up! (The underlying heap will be within roxiemem.)
// This is very unusual, but can happen if a library is used more than once within the same query
// since you will have multiple activity instances with the same activityId.
SpinUnblock b(allAllocatorsLock);
return callback->createAllocator(this, meta, activityId, container->queryAllocatorId(), flags);
}
Expand Down

0 comments on commit 43acc9b

Please sign in to comment.