Copilot commented on code in PR #7048:
URL: https://github.com/apache/shenyu/pull/7048#discussion_r4032635922
##########
shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/MetaDataServiceImpl.java:
##########
@@ -121,6 +122,7 @@ public int deleteByIdsAndNamespaceId(final List<String>
ids, final String namesp
}
@Override
+ @Transactional(rollbackFor = Exception.class)
Review Comment:
This method still passes the caller's full `ids` list to
`updateEnableBatch`, while the preceding select is scoped by `namespaceId` and
the batch-update SQL has no namespace predicate. If a request contains one ID
from the selected namespace and one from another, the foreign row is updated
but only the selected-namespace rows are published, leaving cross-namespace
state inconsistent. Update only the IDs returned by the scoped select (or add
`namespaceId` to the mapper/SQL) and cover the mixed-namespace case.
--
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]