unbridled-41 opened a new issue, #4171:
URL: https://github.com/apache/rocketmq-dashboard/issues/4171

   ## Problem
   
   On the instance Consumer Groups page, the "订阅模式" (subscription mode) select 
applies a **client-side filter** against `groups` — the rows returned for the 
current server page only — while the paginator and the subtitle keep showing 
the **unfiltered** server total.
   
   ## Evidence
   
   `web/src/pages/instance/consumer.tsx` (base `0a596661`):
   
   - `visibleConsumerGroups` (lines 154-162) filters `groups` by `modeFilter` 
client-side; used by the `filtered` memo (lines 470-472) feeding the table 
`dataSource`.
   - `loadConsumerGroupPage` (lines 343-371) calls `listConsumerGroupPage({ 
instanceId, search, page, pageSize })` — no mode parameter — and the table 
paginator (line 1545) uses `total: totalGroups` from the response.
   - The same page's export handler (lines 476-480) passes `subscriptionMode` 
to `/api/groups/export`, and `MetadataService.exportConsumerGroups` (lines 
436-438) filters server-side — so list and export disagree.
   
   Reproduction: with ≥ 2 server pages of groups, select "Push": the table 
shows only the Push rows of the current page (say 3 of 20) but the pager and 
subtitle still say "共 200 个 Group" with 10 pages; switching to a page full of 
Pop rows can show an empty-looking filtered table. Conversely the export for 
the same view contains all matching Push groups server-side.
   
   A new regression test (`passes the subscription mode filter to the server 
query and resets the page`) fails on the unmodified base: after selecting 
"Pop", the last `listConsumerGroupPage` call still lacks `subscriptionMode: 
'Pop'` (red output: `- "subscriptionMode": "Pop"` expected, received call 
without it).
   
   ## Impact
   
   For server-paginated data the client-side slice filter cannot ever be 
correct: rows from other pages are invisible, the total/page count lie about 
the filtered result, and the export of the same filtered view returns a 
different (larger) set than the table shows.
   
   ## Expected behavior
   
   The subscription mode should be sent to `/api/groups/page` and applied 
server-side so the filtered rows, total and page count agree — mirroring what 
the export path already does. Changing the mode resets the page to 1 like the 
search box does.
   
   ## Related work
   
   - #911 (consumer group search trim) is the same "list page filter must reach 
the server" family; the mode filter was left client-side.
   - #2680 (list refresh after mutations) and #2297 (ACL user pagination) are 
different defects.
   - The Apache DB path stores the subscription mode in the 
`rmq_group.message_model` column (read by `toConsumerGroupVO`), so a 
server-side filter is directly supported.
   
   ## PR
   
   Fix incoming.


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