apache / apache/dubbo-go-extensions
[FEATURE] 明确 hystrix filter 在并发调用下的并发约束
- Dominant language
- Go
- Stars
- 11
- Forks
- 5
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 1
Description
### ⚠️ 验证
- [x] 我已搜索本仓库现有 Issue,确认没有重复问题。
- [x] 我已核对 dubbo-go 主仓迁移相关讨论。
### 🎯 方案描述
hystrix filter 已在 dubbo-go 主仓的 #3253 中迁移到 `apache/dubbo-go-extensions`,当前实现位置为 `filter/hystrix/filter.go`。
为了减少维护者和使用方的理解偏差,建议明确 hystrix filter 在并发调用场景下的并发约束:
1. 明确说明该 filter 是否支持多个 goroutine 并发调用 `Invoke`。
2. 若存在并发前提或限制,请在 README / 代码注释中显式写清。
3. 如有必要,再评估是否在入口增加最小化串行保护(需 maintainer 先确认是否接受该方向)。
### 📋 使用场景
- 在高并发场景启用 `hystrix_consumer` / `hystrix_provider` 的用户,需要明确的线程安全预期。
- 评审 race 问题时,需要有明确并发契约来判断是实现缺陷还是调用方越界使用。
### ⚖️ 复杂度与风险
- 先做文档/注释澄清,风险低,且能提升评审一致性。
- 如果加运行时串行保护,可能影响吞吐,需要单独评估并达成共识后再实现。
### 🔗 外部依赖
- `github.com/afex/hystrix-go/hystrix` 的行为与并发保证。
### 📘 补充上下文
- 主仓迁移 PR: https://github.com/apache/dubbo-go/pull/3253
- 触发本跟进的原始评审线程: https://github.com/apache/dubbo-go/pull/3269#discussion_r2985395111
如果 maintainer 认可这个方向,我可以继续补一个小 PR,优先先做文档/注释层的并发约束说明。
Contributor guide
No contributing guide indexed for this repository
Research direction
Read filter/hystrix/filter.go and the related README documentation first, then inspect the concurrency guarantees of github.com/afex/hystrix/hystrix. Document whether concurrent goroutine calls to Invoke are supported and record any stated limitations; consider runtime serialization only after maintainer agreement.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100