X-LightYear opened a new pull request, #4955:
URL: https://github.com/apache/rocketmq-dashboard/pull/4955

   ## Summary
   
   - escape the three hard-coded system-topic prefix patterns used by paginated 
topic queries
   - keep legal user topics containing RETRY, DLQ, or similar rmq_sys text 
visible
   - add deterministic regression coverage for the generated SQL parameters
   
   ## Root cause
   
   `RocketMQMetadataProvider.listTopicsPage` passed literal RocketMQ prefixes 
to MyBatis-Plus `notLikeRight`. The `%` characters in `%RETRY%` and `%DLQ%`, 
and the `_` in `rmq_sys_`, were therefore interpreted as SQL LIKE wildcards. 
The paginated endpoint could omit legal user topics and report an incorrect 
total.
   
   ## Fix
   
   Use explicit `NOT LIKE ... ESCAPE CHAR(92)` predicates with escaped literal 
prefix patterns. The existing non-paginated path already classifies these names 
as system topics using literal prefix checks; the paginated path now has 
equivalent semantics.
   
   ## Testing
   
   - `mvn 
-Dtest=RocketMQMetadataProviderTest#listTopicsPageShouldTreatSystemPrefixesAsLiteralPatternsTest
 test` ? passed
   - `mvn -Dtest=RocketMQMetadataProviderTest test` ? 44 passed
   - H2 in MySQL mode SQL boundary check ? passed
   - `git diff --check` ? passed
   - full `mvn test` reached 2415 tests but had 3 failures and 22 errors in 
unrelated integration contexts because local MySQL rejected the configured root 
credentials
   
   Fixes #4952
   


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