trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DaveBirdsall <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request #552: JIRA TRAFODION-2072 plus few more
Date Tue, 21 Jun 2016 15:51:53 GMT
Github user DaveBirdsall commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/552#discussion_r67896303
  
    --- Diff: core/sql/generator/GenRelScan.cpp ---
    @@ -1131,16 +1139,29 @@ short FileScan::codeGenForHive(Generator * generator)
       // Try to get enough buffer space to hold twice as many records
       // as the up queue.
       //
    -  // This should be more sophisticate than this, and should maybe be done
    -  // within the buffer class, but for now this will do.
    -  // 
    +  
    +  UInt32 FiveM = 5*1024*1024;
    +
    +  // If returnedrowlen > 5M, then set upqueue entries to 2.
    +  if (returnedRowlen > FiveM)
    +    upqueuelength = 2;
    +
       ULng32 cbuffersize = 
         SqlBufferNeededSize((upqueuelength * 2 / numBuffers),
     			returnedRowlen);
       // But use at least the default buffer size.
       //
       buffersize = buffersize > cbuffersize ? buffersize : cbuffersize;
     
    +  // Cap the buffer size at 5M and adjust upqueue entries.
    +  // Do this only if returnrowlen is not > 5M
    +  if ((returnedRowlen <= FiveM) && (buffersize > FiveM))
    --- End diff --
    
    What happens if the returned row length is 3Mb. Do we waste 2Mb in buffer space?


---
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.
---

Mime
View raw message