You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flume.apache.org by Grant Henke <gr...@gmail.com> on 2016/05/05 15:23:14 UTC

Review Request 47021: FLUME-2908: NetcatSource - SocketChannel not closed when session is broken

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/47021/
-----------------------------------------------------------

Review request for Flume.


Bugs: FLUME-2908
    https://issues.apache.org/jira/browse/FLUME-2908


Repository: flume-git


Description
-------

When the NetcatSource socketChannel receives an IOException due to an abruptly closed session the exception is caught but the socketChannel is never closed. This results in leaked sockets and ever growing file descriptors.


Diffs
-----

  flume-ng-core/src/main/java/org/apache/flume/source/NetcatSource.java 61e3f90c014fc5cded2f2e997144c64bfe6f8e17 

Diff: https://reviews.apache.org/r/47021/diff/


Testing
-------


Thanks,

Grant Henke


Re: Review Request 47021: FLUME-2908: NetcatSource - SocketChannel not closed when session is broken

Posted by Grant Henke <gr...@gmail.com>.

> On May 5, 2016, 4 p.m., Jarek Cecho wrote:
> > flume-ng-core/src/main/java/org/apache/flume/source/NetcatSource.java, lines 355-365
> > <https://reviews.apache.org/r/47021/diff/1/?file=1373524#file1373524line355>
> >
> >     What about just moving the socketChannel.close() into finally block?

Yeah, thats better. Will update.


- Grant


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/47021/#review131843
-----------------------------------------------------------


On May 5, 2016, 4:05 p.m., Grant Henke wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47021/
> -----------------------------------------------------------
> 
> (Updated May 5, 2016, 4:05 p.m.)
> 
> 
> Review request for Flume.
> 
> 
> Bugs: FLUME-2908
>     https://issues.apache.org/jira/browse/FLUME-2908
> 
> 
> Repository: flume-git
> 
> 
> Description
> -------
> 
> When the NetcatSource socketChannel receives an IOException due to an abruptly closed session the exception is caught but the socketChannel is never closed. This results in leaked sockets and ever growing file descriptors.
> 
> 
> Diffs
> -----
> 
>   flume-ng-core/src/main/java/org/apache/flume/source/NetcatSource.java 61e3f90c014fc5cded2f2e997144c64bfe6f8e17 
> 
> Diff: https://reviews.apache.org/r/47021/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Grant Henke
> 
>


Re: Review Request 47021: FLUME-2908: NetcatSource - SocketChannel not closed when session is broken

Posted by Jarek Cecho <ja...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/47021/#review131843
-----------------------------------------------------------




flume-ng-core/src/main/java/org/apache/flume/source/NetcatSource.java (lines 355 - 365)
<https://reviews.apache.org/r/47021/#comment195885>

    What about just moving the socketChannel.close() into finally block?


- Jarek Cecho


On May 5, 2016, 3:23 p.m., Grant Henke wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47021/
> -----------------------------------------------------------
> 
> (Updated May 5, 2016, 3:23 p.m.)
> 
> 
> Review request for Flume.
> 
> 
> Bugs: FLUME-2908
>     https://issues.apache.org/jira/browse/FLUME-2908
> 
> 
> Repository: flume-git
> 
> 
> Description
> -------
> 
> When the NetcatSource socketChannel receives an IOException due to an abruptly closed session the exception is caught but the socketChannel is never closed. This results in leaked sockets and ever growing file descriptors.
> 
> 
> Diffs
> -----
> 
>   flume-ng-core/src/main/java/org/apache/flume/source/NetcatSource.java 61e3f90c014fc5cded2f2e997144c64bfe6f8e17 
> 
> Diff: https://reviews.apache.org/r/47021/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Grant Henke
> 
>


Re: Review Request 47021: FLUME-2908: NetcatSource - SocketChannel not closed when session is broken

Posted by Jarek Cecho <ja...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/47021/#review131847
-----------------------------------------------------------


Ship it!




Ship It!

- Jarek Cecho


On May 5, 2016, 4:05 p.m., Grant Henke wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47021/
> -----------------------------------------------------------
> 
> (Updated May 5, 2016, 4:05 p.m.)
> 
> 
> Review request for Flume.
> 
> 
> Bugs: FLUME-2908
>     https://issues.apache.org/jira/browse/FLUME-2908
> 
> 
> Repository: flume-git
> 
> 
> Description
> -------
> 
> When the NetcatSource socketChannel receives an IOException due to an abruptly closed session the exception is caught but the socketChannel is never closed. This results in leaked sockets and ever growing file descriptors.
> 
> 
> Diffs
> -----
> 
>   flume-ng-core/src/main/java/org/apache/flume/source/NetcatSource.java 61e3f90c014fc5cded2f2e997144c64bfe6f8e17 
> 
> Diff: https://reviews.apache.org/r/47021/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Grant Henke
> 
>


Re: Review Request 47021: FLUME-2908: NetcatSource - SocketChannel not closed when session is broken

Posted by Alexander Alten-Lorenz <al...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/47021/#review142739
-----------------------------------------------------------


Ship it!




Ship It!

- Alexander Alten-Lorenz


On May 5, 2016, 4:05 p.m., Grant Henke wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47021/
> -----------------------------------------------------------
> 
> (Updated May 5, 2016, 4:05 p.m.)
> 
> 
> Review request for Flume.
> 
> 
> Bugs: FLUME-2908
>     https://issues.apache.org/jira/browse/FLUME-2908
> 
> 
> Repository: flume-git
> 
> 
> Description
> -------
> 
> When the NetcatSource socketChannel receives an IOException due to an abruptly closed session the exception is caught but the socketChannel is never closed. This results in leaked sockets and ever growing file descriptors.
> 
> 
> Diffs
> -----
> 
>   flume-ng-core/src/main/java/org/apache/flume/source/NetcatSource.java 61e3f90c014fc5cded2f2e997144c64bfe6f8e17 
> 
> Diff: https://reviews.apache.org/r/47021/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Grant Henke
> 
>


Re: Review Request 47021: FLUME-2908: NetcatSource - SocketChannel not closed when session is broken

Posted by Grant Henke <gr...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/47021/
-----------------------------------------------------------

(Updated May 5, 2016, 4:05 p.m.)


Review request for Flume.


Bugs: FLUME-2908
    https://issues.apache.org/jira/browse/FLUME-2908


Repository: flume-git


Description
-------

When the NetcatSource socketChannel receives an IOException due to an abruptly closed session the exception is caught but the socketChannel is never closed. This results in leaked sockets and ever growing file descriptors.


Diffs (updated)
-----

  flume-ng-core/src/main/java/org/apache/flume/source/NetcatSource.java 61e3f90c014fc5cded2f2e997144c64bfe6f8e17 

Diff: https://reviews.apache.org/r/47021/diff/


Testing
-------


Thanks,

Grant Henke