You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug][broker] expired ledger cannot be cleanup when ledger consumed completely #15473
Describe the bug
In some case, expired ledger data cannot be cleanup when the topic has not new message and ledger consumed completely, because the slowestReaderPosition which set to the new ledger will be cover to the old ledger by some cursor operator which like flink reset the Durable Cursor and the auto flushed dirty mark-delete position.
Also, the last expired ledger can not be clean if the topic has not active consumer and expired the message by MessageExpiryMonitor or the cursor markDeletePosition are in some old ledger when stop produce message.
To Reproduce
Steps to reproduce the behavior:
For quickly reproduce we change the config managedLedgerMaxLedgerRolloverTimeMinutes and managedLedgerMinLedgerRolloverTimeMinutes to few minutes.
start broker, create topic and set-message-ttl and set-retention to 4 * managedLedgerMaxLedgerRolloverTimeMinutes;
create Subscription and produce some message longer than set-message-ttl;
stop producer and wait the message expired by MessageExpiryMonitor;
the are two ledger. The has data ledger's all message are expired but can not be cleanup.
Expected behavior
All expired ledger data should be cleanup. There are many expired ledger's data can not be clean , If we have many not new message's topic. we also need migrate the ledger data when we offline one bookie.
Additional context
The bug can be reproduce before the pulsar version 2.10.1, the current master pr #14672 change the behavior of rollCurrentLedgerIfFull when roll full ledger could not create new ledger, I think should resume the behavior to create new ledger.
Thanks @Nicklee007 for the report. This was reported on a Pulsar release before 3.0, which is no longer supported; the supported releases are 4.0.x, 4.2.x and 5.0.x. Much of the code involved has changed since, and the problem hasn't been confirmed on a current release, so I'm closing it as part of cleaning up old reports. If you still see it on a supported release, please open a new issue with the version and steps to reproduce, and link this one.
Activity
github-actions commentedon Jun 6, 2022
The issue had no activity for 30 days, mark with Stale label.
merlimat commentedon Oct 24, 2026
Thanks @Nicklee007 for the report. This was reported on a Pulsar release before 3.0, which is no longer supported; the supported releases are 4.0.x, 4.2.x and 5.0.x. Much of the code involved has changed since, and the problem hasn't been confirmed on a current release, so I'm closing it as part of cleaning up old reports. If you still see it on a supported release, please open a new issue with the version and steps to reproduce, and link this one.