Skip to content

[fix][pulsar-io] Fix memory leak in ElasticSearch sink#15125

Merged
nicoloboschi merged 1 commit intoapache:masterfrom
nicoloboschi:fix/es-sink-mem-leak
May 4, 2022
Merged

[fix][pulsar-io] Fix memory leak in ElasticSearch sink#15125
nicoloboschi merged 1 commit intoapache:masterfrom
nicoloboschi:fix/es-sink-mem-leak

Conversation

@nicoloboschi
Copy link
Contributor

Motivation

After #14805, there's a memory leak while using the OpenSearch client.
Every request is kept in a collection, mapping the request with an unique id. The collection is never clear and the objects never collected by the GC.

Modifications

  • Refactor the internal mapping needed for access the pulsar record removing the collection and passing the object directly into the callback (using a wrapper object)

Note: this only affects current pulsar master.

  • no-need-doc

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Apr 11, 2022
@nicoloboschi
Copy link
Contributor Author

@nicoloboschi nicoloboschi merged commit 97a8825 into apache:master May 4, 2022
@nicoloboschi nicoloboschi deleted the fix/es-sink-mem-leak branch May 4, 2022 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/connector doc-not-needed Your PR changes do not impact docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants