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 01:10:13 UTC

[I] [BUG] MetaDataServiceImpl.deleteByIdsAndNamespaceId / enabledByIdsAndNamespaceId missing @Transactional [shenyu]

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

   - severity: Medium
   - files: `shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/MetaDataServiceImpl.java:110-136`
   - description: `deleteByIdsAndNamespaceId` (110) and `enabledByIdsAndNamespaceId` (124) are not `@Transactional`, unlike `createOrUpdate`/`importData`. `deleteByIdsAndNamespaceId` does select → delete → `publisher.onDeleted`; without a transaction the delete commits before the event. `enabledByIdsAndNamespaceId` mutates the loaded VOs (`setEnabled`) and publishes them via `publisher.onEnabled` — but if the DB update returns 0 rows, it still proceeds to publish the mutated (stale) VOs as if enabled.
   - impact: Inconsistent state between DB and sync consumers on enable; events may describe a state that was not persisted.
   - suggested_fix: Annotate both methods `@Transactional(rollbackFor = Exception.class)`; gate `publisher.onEnabled` on the actual update count.
   - confidence: Medium
   - related_existing: none. N2 is the cross-namespace update bug in the same method; this is the transaction/event gap.
   
   ---
   _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)._


-- 
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] MetaDataServiceImpl.deleteByIdsAndNamespaceId / enabledByIdsAndNamespaceId missing @Transactional [shenyu]

Posted by "Aias00 (via GitHub)" <gi...@apache.org>.
Aias00 closed issue #6708: [BUG] MetaDataServiceImpl.deleteByIdsAndNamespaceId / enabledByIdsAndNamespaceId missing @Transactional
URL: https://github.com/apache/shenyu/issues/6708


-- 
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] MetaDataServiceImpl.deleteByIdsAndNamespaceId / enabledByIdsAndNamespaceId missing @Transactional [shenyu]

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

   👋 Hello @yuluo-yx
   
   A new issue has been opened by @Aias00:
   - **Title**: [BUG] MetaDataServiceImpl.deleteByIdsAndNamespaceId / enabledByIdsAndNamespaceId missing @Transactional
   - **Link**: https://github.com/apache/shenyu/issues/6708
   
   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