unbridled-41 opened a new pull request, #5444:
URL: https://github.com/apache/rocketmq-dashboard/pull/5444
## Problem / Evidence
The 同步数据 dialog checks the broker routes of the topics on the **current
server page** and reports the result as an inventory-wide verdict.
- `web/src/pages/instance/topic.tsx` `openSyncModal` iterates `topics`
(`:594`), which is only the current page loaded by `listTopicsPage`
(`:440-453`, `setTopics(result.items)`), under the active search/type filter.
- The empty state then says: **"所有 Topic 在 Broker 上均有路由,无需同步。"** (`:2068`
pre-fix).
- So a topic that is missing its route on another page (or outside the
current filter) is declared healthy, and the dialog offers no way to reach it —
the operator has to page through and re-run the dialog to discover it.
`/topics/page` is server-paginated (`TopicController.java:53-62`), so page
2+ is never examined.
## Root cause / Fix
A page/filter-scoped scan presented as an inventory-wide claim. The dialog
now states what it checked:
> 当前列表中的 {n} 个 Topic 在 Broker 上均有路由,无需同步(本次校验只覆盖当前页与当前筛选,翻页或清除筛选可校验其他 Topic)。
Scanning the whole inventory instead (`listAllTopics`, as the
config-comparison drawer does) would fire one route request per topic across
the entire cluster; saying what was scanned is the honest minimal change and
leaves that decision open.
## Priority & scoring
PRIORITY 60 = 影响 22 (a maintenance action reports the wrong scope and hides
the topics it exists to find) + 波及 9 (topic sync dialog) + 可复现 18
(deterministic with more than one page) + 维护价值 11.
FIX_CONFIDENCE 72: a copy change that matches the code's real scope, pinned
by the existing sync-dialog test updated to require the scope note.
## Tests
```
cd web && npx vitest run src/pages/instance/__tests__/TopicPage.test.tsx
```
- Red before the fix: `keeps a reopened sync modal owned by its newest route
check` fails — `Unable to find an element with the text: /当前列表中的 1 个 Topic 在
Broker 上均有路由.*只覆盖当前页与当前筛选/`.
- Green after: `Tests 34 passed (34)`.
- `npx tsc -b` and `npx eslint` on both files: clean.
## Risk
None beyond wording: no request, state or behaviour changes.
--
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]