tju-yxq commented on PR #2543:
URL: 
https://github.com/apache/rocketmq-dashboard/pull/2543#issuecomment-5381170201

   Thanks for catching this. I moved pagination into the database layer so the 
service no longer loads all instances and no longer fans out resource-count 
requests for instances outside the current page.
   
   - Added \InstanceRepository.findPage(...)\, implemented with MyBatis-Plus 
\selectPage\ and the same type/search filters.
   - \InstanceService.listInstances(...)\ now uses that repository page and 
fills resource counts/region names only for the returned \pageSize\ rows.
   - The paginated path no longer calls \indAll\, \indByTypeAndSearch\, or 
in-memory \subList\; database reads and remote count fan-out are now 
O(pageSize), not O(total inventory).
   - Added tests proving the repository applies filters/pagination at SQL level 
and proving the service never falls back to the full-list repository methods.
   
   Focused verification: \InstanceServiceTest\, \InstanceControllerTest\, and 
\MybatisPlusInstanceRepositoryTest\ — 102 tests passed, Checkstyle clean, \git 
diff --check\ clean. Pushed as commit \3255cf35\ (\ix: page instances in the 
database\).
   
   I kept the legacy unpaginated endpoint for now because existing instance 
selectors still consume it. We can deprecate or migrate those callers 
separately once the paginated management endpoint is stable.


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