apache / apache/inlong

[Improve][SDK] Fix potential goroutine leak on close in the DataProxy Go SDK by closing connPool before netClient

Open Beginner friendly
#12,202 0 comments 0 reactions 0 assignees View on GitHub
type/improve
Dominant language
Java
Stars
1.5k
Forks
572
Avg merge
22h 7m
Merged PRs (30d)
8

Description

### Description

In the Dataproxy Go SDK, subsequent Dial calls can block forever in EnrollContext once the gnet event-loop has exited during client close, causing goroutine leaks.

### InLong Component

InLong SDK

### Are you willing to submit PR?

- [x] Yes, I am willing to submit a PR!

### Code of Conduct

- [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)

Contributor guide

Open the contributing guide

Research direction

Locate the DataProxy Go SDK close path and inspect how connPool, netClient, and the gnet event loop are shut down. Reproduce or test subsequent Dial calls through EnrollContext after client close; done means they no longer block forever or leak goroutines when the event loop has exited.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
networking
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.