You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Robert Metzger (Jira)" <ji...@apache.org> on 2020/08/07 06:48:00 UTC

[jira] [Commented] (FLINK-13689) Rest High Level Client for Elasticsearch6.x connector leaks threads if no connection could be established

    [ https://issues.apache.org/jira/browse/FLINK-13689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17172937#comment-17172937 ] 

Robert Metzger commented on FLINK-13689:
----------------------------------------

release-1.10: https://github.com/apache/flink/commit/b717877f69d90b3081bb6a79e8d78196831256a7

> Rest High Level Client for Elasticsearch6.x connector leaks threads if no connection could be established
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-13689
>                 URL: https://issues.apache.org/jira/browse/FLINK-13689
>             Project: Flink
>          Issue Type: Bug
>          Components: Connectors / ElasticSearch
>    Affects Versions: 1.8.1
>            Reporter: Rishindra Kumar
>            Assignee: static-max
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.11.0
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> If the created Elastic Search Rest High Level Client(rhlClient) is unreachable, Current code throws RuntimeException. But, it doesn't close the client which causes thread leak.
>  
> *Current Code*
> *if (!rhlClient.ping()) {*
>      *throw new RuntimeException("There are no reachable Elasticsearch nodes!");*
> *}*
>  
> *Change Needed*
> rhlClient needs to be closed.
>  
> *Steps to Reproduce*
> 1. Add the ElasticSearch Sink to the stream. Start the Flink program without starting the ElasticSearch. 
> 2. Program will give error: "*Too many open files*" and it doesn't write even though you start the Elastic Search later.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)