drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jacques-n <...@git.apache.org>
Subject [GitHub] drill pull request: DRILL-3317: when ProtobufLengthDecoder couldn'...
Date Sat, 26 Mar 2016 19:47:17 GMT
Github user jacques-n commented on a diff in the pull request:

    https://github.com/apache/drill/pull/446#discussion_r57518531
  
    --- Diff: exec/rpc/src/main/java/org/apache/drill/exec/rpc/ProtobufLengthDecoder.java
---
    @@ -82,15 +79,7 @@ protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object>
out) t
             } else {
               // need to make buffer copy, otherwise netty will try to refill this buffer
if we move the readerIndex forward...
               // TODO: Can we avoid this copy?
    -          ByteBuf outBuf;
    -          try {
    -            outBuf = allocator.buffer(length);
    -          } catch (OutOfMemoryException e) {
    -            logger.warn("Failure allocating buffer on incoming stream due to memory limits.
 Current Allocation: {}.", allocator.getAllocatedMemory());
    -            in.resetReaderIndex();
    -            outOfMemoryHandler.handle();
    -            return;
    -          }
    +          ByteBuf outBuf = allocator.buffer(length);
    --- End diff --
    
    Can you confirm that this has a consistent failure behavior by adding a test and create
a very small rpc allocator (maybe add a config option to set the max for allocator (not just
reservation)). 


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