drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben-Zvi <...@git.apache.org>
Subject [GitHub] drill pull request #938: DRILL-5694: Handle HashAgg OOM by spill and retry, ...
Date Tue, 12 Sep 2017 23:47:24 GMT
Github user Ben-Zvi commented on a diff in the pull request:

    https://github.com/apache/drill/pull/938#discussion_r138494777
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/aggregate/HashAggTemplate.java
---
    @@ -1178,20 +1273,38 @@ private void checkGroupAndAggrValues(int incomingRowIdx) {
         hashCode >>>= bitsInMask;
         HashTable.PutStatus putStatus = null;
         long allocatedBeforeHTput = allocator.getAllocatedMemory();
    -
         // ==========================================
         // Insert the key columns into the hash table
         // ==========================================
    +    boolean noReserveMem = reserveValueBatchMemory == 0;
         try {
    +      if ( noReserveMem && canSpill ) { throw new RetryAfterSpillException();}
// proactive spill, skip put()
    +
           putStatus = htables[currentPartition].put(incomingRowIdx, htIdxHolder, hashCode);
    +
    +    } catch (RetryAfterSpillException re) {
    --- End diff --
    
    Done. 


---

Mime
View raw message