Skip to content

[improve][broker] Skip system cursor when check inactive cursor.#26149

Open
horizonzy wants to merge 1 commit into
apache:masterfrom
horizonzy:skip-system-cursor-check-inactive-sub
Open

[improve][broker] Skip system cursor when check inactive cursor.#26149
horizonzy wants to merge 1 commit into
apache:masterfrom
horizonzy:skip-system-cursor-check-inactive-sub

Conversation

@horizonzy

@horizonzy horizonzy commented Jul 6, 2026

Copy link
Copy Markdown
Member

Motivation

PersistentTopic#checkInactiveSubscriptions skips built-in system subscriptions such as the compaction subscription when deleting expired inactive subscriptions. However, subscriptions configured through additionalSystemCursorNames are also treated as system cursors elsewhere, but were not skipped by this expiration cleanup path. As a result, an additional system cursor could be deleted when it became inactive past the subscription expiration threshold.

Modifications

• Updated PersistentTopic#checkInactiveSubscriptions to skip subscriptions identified by isSystemCursor(subName) instead of only checking the compaction subscription.
• Extended PersistentTopicTest#testCheckInactiveSubscriptions to configure an additionalSystemCursorNames entry and verify that the corresponding subscription is not deleted during inactive subscription cleanup.

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

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