[Improve][SDK] Avoid calling endpoint update handlers while holding the lock in the Dataproxy Go SDK discoverers
- Dominant language
- Java
- Stars
- 1.5k
- Forks
- 572
- Avg merge
- 22h 7m
- Merged PRs (30d)
- 8
Description
### Description
In the Dataproxy Go SDK, if an OnEndpointUpdate handler calls back into AddEventHandler/DelEventHandler/GetEndpoints from within the Manager-based or DNS discoverer's lookup, the same goroutine re-enters the discoverer's RWMutex and deadlocks.
### 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
Research direction
Locate the Dataproxy Go SDK's Manager-based and DNS discoverer lookup entry points and inspect how their RWMutex is held while invoking OnEndpointUpdate handlers. Add regression coverage for handlers that call AddEventHandler, DelEventHandler, or GetEndpoints, and verify those callbacks complete without deadlocking.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100