You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "beautyarbutin (via GitHub)" <gi...@apache.org> on 2026/09/21 14:37:01 UTC
[PR] fix(consumer): filter subscription mode before pagination [rocketmq-dashboard]
beautyarbutin opened a new pull request, #4773:
URL: https://github.com/apache/rocketmq-dashboard/pull/4773
### Which Issue(s) This PR Fixes
- Fixes #3150
### Brief Description
The consumer subscription-mode selector currently filters only the records returned for the active page. This change sends the selected mode to the page API and applies it before pagination for both Apache and cloud-backed providers. Switching modes resets the UI to page 1, and exports use the same mode normalization.
This reimplements the still-open issue on the current `rocketmq-studio` branch. Related earlier attempts #3160 and #4053 were closed when that branch was removed during the previous branch migration; #4172 was closed as a duplicate.
### How Did You Test This Change?
- `cd server && mvn -B -ntp "-Dtest=ConsumerGroupControllerTest,MetadataServiceTest,InstanceProviderTest,ApacheInstanceProviderTest,RocketMQMetadataProviderTest" test`: 129 tests passed.
- `cd web && npm test -- --run src/pages/instance/__tests__/ConsumerPage.test.tsx src/api/consumerGroups.test.ts`: 41 tests passed.
- `cd web && npx eslint src/api/consumerGroups.test.ts src/api/metadata.ts src/pages/instance/__tests__/ConsumerPage.test.tsx src/pages/instance/consumer.tsx`: passed.
- `cd web && npx tsc -b --pretty false`: passed.
- `cd web && npm run build`: passed.
- `cd server && mvn -B -ntp test`: attempted; 3,054 tests ran with 0 failures, 18 errors, and 4 skipped. The errors are outside the changed paths and require unavailable local MySQL-backed contexts or the Claude Code CLI expectation in `ClaudeCodeAgentProviderTest`.
### Checklist
- [x] One coherent change; unrelated modifications are not bundled in
- [x] Commit subject follows Conventional Commits (`feat:` / `fix:` / `refactor:` / `chore:` / `docs:` / `perf:`)
- [x] Tests added or updated for non-trivial changes, test methods named `...Test`
- [x] New UI text has both Chinese and English entries under `web/src/i18n/` (no new UI text)
- [ ] Architecture constraints stay green (`mvn test` runs the ArchUnit checks; the full suite is environment-blocked as noted above)
- [x] New source files carry the ASF license header
- [x] Documentation touched where behaviour changed (no documentation update required for this bug fix)
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(consumer): filter subscription mode before pagination [rocketmq-dashboard]
Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins closed pull request #4773: fix(consumer): filter subscription mode before pagination
URL: https://github.com/apache/rocketmq-dashboard/pull/4773
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(consumer): filter subscription mode before pagination [rocketmq-dashboard]
Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins commented on PR #4773:
URL: https://github.com/apache/rocketmq-dashboard/pull/4773#issuecomment-5806616585
Thanks for the thorough write-up — the diagnosis is accurate, and the shape of the fix is the right one: threading `subscriptionMode` down into the provider page query so the predicate joins the `LambdaQueryWrapper` before `selectPage`, with the total taken from the database count, is exactly how a filter on a server-paginated list has to work (and it matches what the CSV export path already does).
We are not taking it, though, and I would rather say why explicitly than leave the PR hanging.
What this fixes is a filtering inaccuracy on the consumer-group list: the Push/Pop selector filters the rows already loaded for the current server page while the pager reports the unfiltered total. In practice a single instance carries a small number of consumer groups, so the window where those two disagree is narrow, and the operator still reaches the groups by clearing the filter or paging. Against that, the change replaces signatures across the provider SPI (`InstanceProvider.listConsumerGroupsPage`, `MetadataProvider.listConsumerGroupsPage`, the Apache provider and its query wrapper) and touches 16 files — a wide contract change, carried by every provider implementation including the cloud ones, for a low-impact correction.
So this is "not planned" rather than "wrong": the reasoning in the PR is sound, we just do not think the SPI churn is justified by what it buys today. Closing it, and no rework is expected on your side. If the subscription-mode filter ever becomes a correctness problem at realistic group counts, that is the moment to revisit the pushdown.
The same applies to #4813, which attacked the same defect from the service layer — that one is closed too, with the specifics in its own thread.
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org