[BUG] DataPermission pagination: count uses exact-name match while list uses LIKE → wrong totals
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
Research direction
Start with listSelectorsByPage and listRulesByPage in shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/DataPermissionServiceImpl.java, then compare the count and list statements in selector-sqlmap.xml and rule-sqlmap.xml at the referenced lines. Confirm that filtered totals and rows use the same name predicate. Done means countByQuery and selectByQuery describe the same keyword-matched result set, restoring correct CommonPager totals.
Written by the indexing model from the issue text.
Description
- severity: Medium
- files:
shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/DataPermissionServiceImpl.java:168,200;shenyu-admin/src/main/resources/mappers/selector-sqlmap.xml:166-185(count:selector_name = #{name}) vs:107-135(list:selector_name LIKE);shenyu-admin/src/main/resources/mappers/rule-sqlmap.xml:113-131(count:rule_name = #{name}) vs:74-94(list:rule_name LIKE) - description:
listSelectorsByPage/listRulesByPagecallcountByQueryfor the total andselectByQueryfor the page rows. The count statements filternamewith exact=, while the list statements filter the samenamewith leading-wildcardLIKE '%name%'. The count and row set describe different result sets, soCommonPagerreports an inconsistent total. - impact: Broken pagination metadata on the data-permission assignment screens whenever a name keyword is entered.
- suggested_fix: Make
countByQueryuse the sameLIKEpredicate asselectByQuery. - confidence: High
- related_existing: none. PERF-40 covers the correlated-exists + leading-wildcard LIKE performance aspect of
selectByCondition, not this count/list predicate divergence.
Identified during the 2026-08-02 deep re-scan; full list in docs/scan2-2026-08-02/06-medium-tiers.md.
- Dominant language
- Java
- Stars
- 8.8k
- Forks
- 3.1k
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 85
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/shenyu
-
plugin: mock priority: medium type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
-
admin priority: medium type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
[BUG] DivideIngressParser protocol[i++] throws AIOOBE when protocol array shorter than endpoints Openkubernetes priority: medium type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
[BUG] ContextPathParser concatenates null annotation value with /** — literal null/** rule condition Openkubernetes priority: medium type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
kubernetes priority: medium type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100