Skip to content

Conversation

@karenc-bq
Copy link
Contributor

Summary

PG client was not properly removing attached error listeners when releasing connections.
This PR ensures listeners are removed before ending connections.

Description

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@karenc-bq karenc-bq requested a review from a team as a code owner January 8, 2026 20:11
this.properties,
"end",
() => {
this.pluginService.removeErrorListener(this.targetClient);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The actual method of removeErrorListener only removes the trackingListener - would it be cleaner to remove the noOpListener as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

noOp listeners are only attached during the execution pipeline, so they should already be removed at the end of the application. end() may be called during the execution pipeline (PluginManager#execute()), so I want to avoid accidentally removing the listeners during the workflow.

@karenc-bq karenc-bq merged commit 2f837ff into main Jan 9, 2026
12 checks passed
@karenc-bq karenc-bq deleted the fix/pg-remove-listener-when-ending-connections branch January 9, 2026 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants