Skip to content

Conversation

@bruceNu1l
Copy link
Contributor

@bruceNu1l bruceNu1l commented Sep 28, 2025

When a connection is opened via databaseImpl, the cache clientCache initializes
*flightsql.Client objects which require proper cleanup on connection close to
prevent Goroutine leaks.

Previously, closing a connection released only 3 of the 6 Goroutines created per
connection, leaving 3 Goroutines associated with the cached client unmanaged.
This resulted in accumulated Goroutine leaks over time.

The fix ensures all Goroutines are properly cleaned up when connections are closed.

@github-actions github-actions bot added this to the ADBC Libraries 21 milestone Sep 28, 2025
@bruceNu1l bruceNu1l force-pushed the fix/goroutine-leak branch 2 times, most recently from eb0f745 to c5254f4 Compare September 28, 2025 08:15
@bruceNu1l bruceNu1l changed the title Fix a goroutine leak bug fix: resolve Goroutine leak in database connection close Sep 28, 2025
Copy link
Member

@zeroshade zeroshade left a comment

Choose a reason for hiding this comment

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

thanks for this!

@zeroshade
Copy link
Member

Looks like there's some linting that needs to get fixed before I can merge.

@bruceNu1l
Copy link
Contributor Author

bruceNu1l commented Oct 9, 2025

Looks like there's some linting that needs to get fixed before I can merge.

@zeroshade Yes, I've fixed the linting issues.

@zeroshade zeroshade merged commit fb6306f into apache:main Oct 21, 2025
43 checks passed
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