Skip to content

Commit

Permalink
PIG-5385: Skip calling extra gc() before spilling large bag when unne…
Browse files Browse the repository at this point in the history
…cessary (knoguchi)

git-svn-id: https://svn.apache.org/repos/asf/pig/trunk@1862506 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Koji Noguchi committed Jul 3, 2019
1 parent c8ac87c commit bc370d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ PIG-5282: Upgade to Java 8 (satishsaley via rohini)

IMPROVEMENTS

PIG-5385: Skip calling extra gc() before spilling large bag when unnecessary (knoguchi)

PIG-5389: Passing null to REPLACE udf preventing JIT optimization (knoguchi)

PIG-5382: Log the name when POStore fails on write (knoguchi)
Expand Down
3 changes: 2 additions & 1 deletion src/org/apache/pig/impl/util/SpillableMemoryManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,8 @@ public int compare(SpillablePtr o1Ref, SpillablePtr o2Ref) {
// Do not invoke extraGC for GroupingSpillable. Its size will always exceed
// extraGCSpillSizeThreshold and the data is always strong referenced.
if( !extraGCCalled && extraGCSpillSizeThreshold != 0
&& toBeFreed > extraGCSpillSizeThreshold && !isGroupingSpillable) {
&& toBeFreed > extraGCSpillSizeThreshold && !isGroupingSpillable
&& n.getType().equals(MemoryNotificationInfo.MEMORY_THRESHOLD_EXCEEDED)) {
log.debug("Single spillable has size " + toBeFreed + "bytes. Calling extra gc()");
// this extra assignment to null is needed so that gc can free the
// spillable if nothing else is pointing at it
Expand Down

0 comments on commit bc370d8

Please sign in to comment.