[BUG] ProxySelectorServiceImpl.importData (both overloads) missing @Transactional
- Dominant language
- Java
- Stars
- 8.8k
- Forks
- 3.1k
- Avg merge
- 7d 1h
- Merged PRs (30d)
- 85
Description
- severity: Medium
- files: `shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/ProxySelectorServiceImpl.java:462-499` and `:501-545`
- description: Neither `importData` overload is `@Transactional`. The namespace version also mutates `context.getProxySelectorIdMapping()` mid-loop; a later failure leaves the mapping and the inserted rows in an inconsistent half-applied state with no outer transaction from `ConfigsServiceImpl.configsImport`.
- impact: Partial proxy-selector import; downstream rel/upstream imports that depend on `proxySelectorIdMapping` may resolve ids to entries that get rolled back by a different handler.
- suggested_fix: Annotate both overloads with `@Transactional(rollbackFor = Exception.class)`.
- confidence: High
- related_existing: none.
---
_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
Read shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/ProxySelectorServiceImpl.java around lines 462-545, then trace ConfigsServiceImpl.configsImport to understand the import flow. Done means both importData overloads roll back the proxy-selector rows and namespace mapping consistently when an exception occurs; verify with the relevant existing import tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 82/100