Skip to content

[fix][broker] Fix backlog clearing for unloaded namespace bundles#25272

Open
zhanghaou wants to merge 1 commit intoapache:masterfrom
zhanghaou:dev-clear-topics-backlog-in-namespace
Open

[fix][broker] Fix backlog clearing for unloaded namespace bundles#25272
zhanghaou wants to merge 1 commit intoapache:masterfrom
zhanghaou:dev-clear-topics-backlog-in-namespace

Conversation

@zhanghaou
Copy link
Contributor

Fixes #20706

Motivation

Clearing backlog for a namespace/bundle should work even when the bundle is not loaded on any broker.

Modifications

  1. Convert namespace backlog clear paths to async internal methods and update v1/v2 admin resources to use async-response flow consistent with existing patterns (e.g. getMaxProducersPerTopic).
  2. Ensure bundle backlog clearing can operate when bundles are unloaded by enumerating persistent topics from metadata and loading topics as needed.
  3. Add tests to verify backlog clearing on unloaded bundles (all subscriptions and per-subscription cases).

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository:

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-not-needed Your PR changes do not impact docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Namespace admin cli clear-backlog can not clear unloaded topics' backlog

1 participant