drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adeneche <...@git.apache.org>
Subject [GitHub] drill pull request: DRILL-3317: when ProtobufLengthDecoder couldn'...
Date Tue, 29 Mar 2016 06:12:45 GMT
Github user adeneche commented on a diff in the pull request:

    https://github.com/apache/drill/pull/446#discussion_r57676038
  
    --- 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 --
    
    @jacques-n can you confirm it's indeed the case ? thanks


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