You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by "Aias00 (via GitHub)" <gi...@apache.org> on 2026/08/03 00:49:44 UTC

[I] [BUG] DiscoveryUpstreamServiceImpl.importData(namespace,...) missing @Transactional (partial commit on failure) [shenyu]

Aias00 opened a new issue, #6620:
URL: https://github.com/apache/shenyu/issues/6620

   - severity: High
   - files: `shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/DiscoveryUpstreamServiceImpl.java:292-331`
   - description: The single-arg `importData(List)` at line 255 is annotated `@Transactional(rollbackFor = Exception.class)`, but the namespace-scoped overload at line 293 is **not** (verified: grep shows no `@Transactional` between line 255 and 293). The method loops, inserts rows one-by-one, and remaps `discoveryHandlerId` via `context.getDiscoveryHandlerIdMapping()`. If a mid-loop insert fails, earlier inserts are already committed with no rollback. `ConfigsServiceImpl.configsImport` wraps the call with no outer transaction.
   - impact: Partial import leaves orphaned discovery-upstream rows pointing at non-existent handlers; retrying the import then double-counts or fails differently.
   - suggested_fix: Add `@Transactional(rollbackFor = Exception.class)` to the namespace overload, consistent with the single-arg version.
   - confidence: High
   - related_existing: none. The reported upstream items are N+1/listAll concerns, not this transaction gap.
   
   ---
   _Identified during the 2026-08-02 deep re-scan; full list in [`docs/scan2-2026-08-02/00-consolidated-critical-high.md`](docs/scan2-2026-08-02/00-consolidated-critical-high.md)._


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [BUG] DiscoveryUpstreamServiceImpl.importData(namespace,...) missing @Transactional (partial commit on failure) [shenyu]

Posted by "Aias00 (via GitHub) via notifications" <no...@shenyu.apache.org>.
Aias00 commented on issue #6620:
URL: https://github.com/apache/shenyu/issues/6620#issuecomment-6791274674

   Verified against current master (9dd9a12fb). The namespace-scoped `DiscoveryUpstreamServiceImpl.importData(namespace, ...)` overload is annotated `@Transactional(rollbackFor = Exception.class)` (merged PR #6532). Closing as resolved.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [BUG] DiscoveryUpstreamServiceImpl.importData(namespace,...) missing @Transactional (partial commit on failure) [shenyu]

Posted by "wy471x (via GitHub)" <gi...@apache.org>.
wy471x commented on issue #6620:
URL: https://github.com/apache/shenyu/issues/6620#issuecomment-5975486435

   /assign


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [BUG] DiscoveryUpstreamServiceImpl.importData(namespace,...) missing @Transactional (partial commit on failure) [shenyu]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #6620:
URL: https://github.com/apache/shenyu/issues/6620#issuecomment-5161205857

   👋 Hello @Aias00
   
   A new issue has been opened by @Aias00:
   - **Title**: [BUG] DiscoveryUpstreamServiceImpl.importData(namespace,...) missing @Transactional (partial commit on failure)
   - **Link**: https://github.com/apache/shenyu/issues/6620
   
   Please review when you have time. Thank you! 🙏


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [BUG] DiscoveryUpstreamServiceImpl.importData(namespace,...) missing @Transactional (partial commit on failure) [shenyu]

Posted by "sunnysabor (via GitHub)" <gi...@apache.org>.
sunnysabor commented on issue #6620:
URL: https://github.com/apache/shenyu/issues/6620#issuecomment-5931909656

   I rechecked this report against the current master. `DiscoveryUpstreamServiceImpl.importData(namespace, ...)` now has `@Transactional(rollbackFor = Exception.class)` (introduced by merged PR #6532), so the partial-commit condition described here appears resolved. I also ran `DiscoveryUpstreamServiceTest` on current master as part of `./mvnw -pl shenyu-admin -Dtest=PageParameterTest,DiscoveryUpstreamServiceTest -Djacoco.skip=true -Dmaven.javadoc.skip=true test`; it passed. This issue may be ready to close if maintainers agree.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [BUG] DiscoveryUpstreamServiceImpl.importData(namespace,...) missing @Transactional (partial commit on failure) [shenyu]

Posted by "Aias00 (via GitHub) via notifications" <no...@shenyu.apache.org>.
Aias00 closed issue #6620: [BUG] DiscoveryUpstreamServiceImpl.importData(namespace,...) missing @Transactional (partial commit on failure)
URL: https://github.com/apache/shenyu/issues/6620


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org