tzulitai commented on issue #9468: [FLINK-13689] [Connectors/ElasticSearch] Fix 
thread leak when elasticsearch6 rest high level cli…
URL: https://github.com/apache/flink/pull/9468#issuecomment-522470438
 
 
   Thanks for the fix @Rishi55.
   
   Instead of the proposed fix, I wonder if we should actually not ping and 
throw within the `createClient` implementation. My reasoning is that cleanup of 
the resources, including the client, is already handled within the `close` 
method of the `ElasticsearchSinkBase`, and IMO is the correct place to handle 
this.
   
   So, essentially the fix would be to scope down the responsibility of the 
`createClient` method to simply return the instantiated instance.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to