close FileChannel after mapping

Someone has to close it.  I could simply call unlock after the connection
closes, so don't think there is really a gain.
On Sep 15, 2014 4:22 PM, "Haoyuan Li" <notifications@github.com> wrote:

> In core/src/main/java/tachyon/worker/netty/BlockResponse.java:
>
> > @@ -48,6 +48,7 @@ protected void encode(final ChannelHandlerContext ctx, final BlockResponse msg,
> >              msg.getChannel().map(FileChannel.MapMode.READ_ONLY, msg.getOffset(),
> >                  msg.getLength());
> >              out.add(Unpooled.wrappedBuffer(data));
> > +            msg.getChannel().close();
>
> It makes sure that the data will be not evicted by the worker during the
> transfer process. After TachyonByteBuffer.close(), the data can be evicted.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/amplab/tachyon/pull/435/files#r17575325>.
>