Skip to content

[Bug] Final managed-ledger ledger cannot be offloaded after topic termination #25956

@void-ptr974

Description

@void-ptr974

Search before reporting

  • I searched in the issues and found nothing similar.

Read release policy

  • I understand that unsupported versions don't get bug fixes. I will attempt to reproduce the issue on a supported version of Pulsar client and Pulsar broker.

User environment

Reproduced on current master.

Issue Description

After a persistent topic is terminated, the final managed-ledger ledger cannot be offloaded.

Earlier closed ledgers can be offloaded normally, but the last ledger remains in BookKeeper. Since topic termination closes the topic for further writes, the final ledger is no longer active and should be eligible for offload when tiered storage is enabled.

This causes terminated topic data to be only partially offloaded, with the final ledger continuing to consume BookKeeper storage.

Expected behavior:

The final ledger of a terminated topic should be offloadable when it matches the configured offload policy.

Actual behavior:

The final ledger remains not offloaded after topic termination.

Error messages

No error message is required to reproduce this issue.

Reproducing the issue

  1. Configure tiered-storage offload for a namespace or topic.
  2. Produce messages to a persistent topic.
  3. Terminate the topic.
  4. Trigger offload, or configure automatic offload thresholds so the topic data should be eligible for offload.
  5. Check the managed-ledger offload metadata or BookKeeper storage.

The final managed-ledger ledger of the terminated topic remains not offloaded.

Additional information

Related PR: #25955

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions