Skip to content

fix(topic): discard outcomes from closed comparisons - #7215

Open
zmuxuny wants to merge 2 commits into
apache:rocketmq-studiofrom
zmuxuny:fix/topic-comparison-disposal-oct20
Open

zmuxuny wants to merge 2 commits into
apache:rocketmq-studiofrom
zmuxuny:fix/topic-comparison-disposal-oct20

Conversation

@zmuxuny

@zmuxuny zmuxuny commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Which Issue(s) This PR Fixes

Fixes #7214

Brief Description

Invalidate the Topic configuration comparison's request generation when its component unmounts. TopicPage conditionally mounts this modal, so Close or leaving the page must also end ownership of its pending read outcomes. Otherwise a rejected inventory read displays a global failure notification over the page the operator is now using.

This adds disposal cleanup to the existing generation guard. The existing instance-pair invalidation from #4585 / #4586 is preserved. No API, inventory comparison, export, request cancellation or backend behavior changes.

How Did You Test This Change?

Added four real-component cases: source failure after unmount, target failure after unmount, an old failure after reopening and completing a new comparison, and a still-current failure under React StrictMode.

On unchanged production at 127c47b, the three abandoned-comparison cases fail and all 12 other cases pass. With the fix:

  • TopicConfigComparisonModal and topicConfigComparison suites: 26 tests pass.
  • Forced TypeScript build: passed.
  • Changed-file ESLint and Prettier: passed.
  • Production build and artifact license check: Passed (132 components, 139 license files).

No live cluster was used. The inventory service promises are controlled; AntD and the comparison component are real. Full frontend/backend suites were not run locally; remote CI will be checked on the published commit. Independent diff review: Approved; independently reran the focused 15-case component suite.

Checklist

  • Single coherent fix with regressions; existing assertions retained.
  • Conventional Commit and DCO sign-off.
  • No new UI strings, dependencies or source files.
  • AI assistance disclosed.

Signed-off-by: zmuxuny <xiahoumuxuan@gmail.com>
Reuse the five-line ConsumerPage timer isolation from commit
381c5c4, credited to pilichoumao's
apache#6521. Keep production polling, all existing
assertions, and independent automatic-refresh coverage unchanged.

Signed-off-by: zmuxuny <xiahoumuxuan@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant