apache / apache/inlong

[Improve][SDK] Fix panic on sending to a closed channel during shutdown in the DataProxy Go SDK

Open
#12,199 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, sending on the already-closed sendFailedBatches, retryBatches, or responseBatches channels during shutdown can raise a "send on closed channel" panic and crash the process.

### 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

Start by locating the Dataproxy Go SDK code that owns the sendFailedBatches, retryBatches, and responseBatches channels, then trace shutdown and every send to those channels. Reproduce or run the SDK shutdown-related tests if available. Done means shutdown no longer permits a send-on-closed-channel panic or process crash.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
57/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.