[BUG] — `ApacheDubboProxyService`: per-request `GsonUtils` parse of selector handle into `List<DubboUpstream>`
- Dominant language
- Java
- Stars
- 8.8k
- Forks
- 3.1k
- Avg merge
- 7d 1h
- Merged PRs (30d)
- 85
Description
- severity: Medium-High
- files: `shenyu-plugin-.../apache-dubbo/.../proxy/ApacheDubboProxyService.java:129` (`GsonUtils.getInstance().fromList(selectorData.getHandle(), DubboUpstream.class)` inside `getReferenceConfig`, called per request)
- description: `getReferenceConfig` is invoked on each Dubbo-routed request and re-parses the selector handle JSON into `List` every time, even though the handle only changes on config sync.
- impact: Redundant JSON deserialization + Gson reflection allocation per Dubbo request.
- suggested_fix: Cache parsed `DubboUpstream` list keyed by `selectorData.getId()`/handle-hash in `ApacheDubboConfigCache` (invalidate on `onSelectorUpdated`).
- confidence: High
---
_Identified during the 2026-08-02 deep re-scan; full list in [`docs/scan2-2026-08-02/06-medium-tiers.md`](docs/scan2-2026-08-02/06-medium-tiers.md)._
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at ApacheDubboProxyService.java:129 and trace getReferenceConfig, then inspect ApacheDubboConfigCache and the onSelectorUpdated path mentioned in the issue. Done means selector handles are not deserialized on every Dubbo-routed request, while updated selector data invalidates the cached DubboUpstream list.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, performance
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100