Skip to content

Commit bc370d8

Browse files
author
Koji Noguchi
committed
PIG-5385: Skip calling extra gc() before spilling large bag when unnecessary (knoguchi)
git-svn-id: https://svn.apache.org/repos/asf/pig/trunk@1862506 13f79535-47bb-0310-9956-ffa450edef68
1 parent c8ac87c commit bc370d8

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ PIG-5282: Upgade to Java 8 (satishsaley via rohini)
2626

2727
IMPROVEMENTS
2828

29+
PIG-5385: Skip calling extra gc() before spilling large bag when unnecessary (knoguchi)
30+
2931
PIG-5389: Passing null to REPLACE udf preventing JIT optimization (knoguchi)
3032

3133
PIG-5382: Log the name when POStore fails on write (knoguchi)

src/org/apache/pig/impl/util/SpillableMemoryManager.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,8 @@ public int compare(SpillablePtr o1Ref, SpillablePtr o2Ref) {
293293
// Do not invoke extraGC for GroupingSpillable. Its size will always exceed
294294
// extraGCSpillSizeThreshold and the data is always strong referenced.
295295
if( !extraGCCalled && extraGCSpillSizeThreshold != 0
296-
&& toBeFreed > extraGCSpillSizeThreshold && !isGroupingSpillable) {
296+
&& toBeFreed > extraGCSpillSizeThreshold && !isGroupingSpillable
297+
&& n.getType().equals(MemoryNotificationInfo.MEMORY_THRESHOLD_EXCEEDED)) {
297298
log.debug("Single spillable has size " + toBeFreed + "bytes. Calling extra gc()");
298299
// this extra assignment to null is needed so that gc can free the
299300
// spillable if nothing else is pointing at it

0 commit comments

Comments
 (0)