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

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

Shang Yuanchun (Jira)
Rishindra Kumar created FLINK-13689:
---------------------------------------

             Summary: 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
             Fix For: 1.8.2


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 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
(v7.6.14#76016)