Skip to content

Potential REST Connection Leak in InitializationUtils #883

Closed
@jbaiera

Description

@jbaiera

In certain cases, a call to checkIndexExistence may leak a client connection:

https://github.com/elastic/elasticsearch-hadoop/blob/master/mr/src/main/java/org/elasticsearch/hadoop/rest/InitializationUtils.java#L259-L271

This occurs if the following situations are satisfied:

  1. The client object passed in is null.
  2. es.index.auto.create is set to false (away from the default true value).
  3. The write index exists.
  4. The client closing method is skipped over.
  5. Newly created client object does not close it's resources.

While this is most likely not a problem on most of the integrations, it may pose an issue for long lived tasks.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions