You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by adeneche <gi...@git.apache.org> on 2015/09/11 23:32:37 UTC

[GitHub] drill pull request: DRILL-1942-hygiene:

Github user adeneche commented on a diff in the pull request:

    https://github.com/apache/drill/pull/133#discussion_r39319998
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/ops/BufferManager.java ---
    @@ -51,11 +48,12 @@ public BufferManager(BufferAllocator allocator, FragmentContext fragmentContext)
         this.fragmentContext = fragmentContext;
       }
     
    +  @Override
       public void close() throws Exception {
    -    Object[] mbuffers = ((LongObjectOpenHashMap<Object>)(Object)managedBuffers).values;
    -    for (int i =0; i < mbuffers.length; i++) {
    +    final Object[] mbuffers = ((LongObjectOpenHashMap<Object>) (Object) managedBuffers).values;
    +    for (int i = 0; i < mbuffers.length; i++) {
           if (managedBuffers.allocated[i]) {
    -        ((DrillBuf)mbuffers[i]).release();
    +        ((DrillBuf) mbuffers[i]).release(1);
    --- End diff --
    
    why not just call release(), it calls release(1) internally ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---