konlue opened a new pull request, #7691:
URL: https://github.com/apache/shenyu/pull/7691

   Fixes #7690.
   
   ### Modifications
   
   The excluded-search predicates in `plugin-sqlmap.xml` and 
`namespace-plugin-rel-sqlmap.xml` were joined with `OR` (`name NOT LIKE x OR 
role NOT LIKE x`). A row therefore survived whenever either column missed the 
term, so `!divide` still returned the divide plugin because its role `"Proxy"` 
does not match.
   
   The join is now `AND` in both mappers, excluding a plugin when any 
searchable field matches. This is symmetric with the positive keyword search, 
which already uses `OR` across the same two columns.
   
   ### Verifying this change
   
   - [x] New 
`PluginMapperTest#excludedSearchDropsPluginWhenAnySearchableFieldMatches` and 
`NamespacePluginRelMapperTest#excludedSearchDropsRelPluginWhenAnySearchableFieldMatches`:
 seed one plugin whose name matches the exclusion and one whose name does not, 
then assert the excluded row is dropped and the other retained. The "name 
matches, role does not" case fails with the previous `OR` join and passes with 
this change.
   - [x] Targeted tests pass:
   
     ```bash
     ./mvnw -B -ntp -pl shenyu-admin test 
-Dtest=PluginMapperTest,NamespacePluginRelMapperTest
     ```
   
     20/20 green.
   
   ### Notes
   
   - Both `name` and `role` are NOT NULL in every schema dialect, so 
nullable-field handling is unchanged.
   
   ### Checklist
   
   - [x] I have read the contribution guidelines.
   - [x] Tests back the changes.
   - [ ] Full `./mvnw clean install -Dmaven.javadoc.skip=true` (targeted 
reactor tests used instead).


-- 
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]

Reply via email to