FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[fix][broker] Cancel queued transaction snapshot recovery on topic close by Demogorgon314 · Pull Request #26335 · apache/pulsar · GitHub

/ pulsar Public

[fix][broker] Cancel queued transaction snapshot recovery on topic close - #26335

Open
Demogorgon314 wants to merge 5 commits into
apache:masterfrom
Demogorgon314:Demogorgon314/Cancel-queued-transaction-snapshot-recovery-on-topic-close
Open

[fix][broker] Cancel queued transaction snapshot recovery on topic close#26335
Demogorgon314 wants to merge 5 commits into
apache:masterfrom
Demogorgon314:Demogorgon314/Cancel-queued-transaction-snapshot-recovery-on-topic-close

Conversation

Copy link
Copy Markdown
Member

Motivation

Transaction snapshot recovery tasks can remain queued after a topic is closed.
The queued task retains the snapshot processor, topic, and managed ledger,
causing closed topics to accumulate when topic loading is repeatedly retried.

Modifications

  • Cancel queued snapshot recovery tasks when the transaction buffer closes.
  • Wait for running recovery to stop before releasing snapshot resources.
  • Prevent recovery from succeeding after close has started.
  • Stop segmented recovery between I/O operations after close.
  • Handle recovery task submission rejection asynchronously.
  • Add tests for queued, running, completed, retried, and rejected recovery.

Topic close may now wait for an in-flight recovery I/O operation to finish before releasing snapshot resources.

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

Cancel queued snapshot recovery tasks when the transaction buffer closes and wait for running recovery before releasing snapshot resources.

This prevents the recovery executor queue from retaining closed topics and managed ledgers.
Demogorgon314 self-assigned this Aug 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

2 participants


Back | FazBrowse Home | New Git URL