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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
