[Bug] readoffload while ledger trim may case NoSuchLedgerExistsException
- Dominant language
- Java
- Stars
- 15.3k
- Forks
- 3.8k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 160
Description
### Search before asking
- [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.
### Version
master
### Minimal reproduce step
1. ledger create
2. ledger offload succeed
3. reach the ManagedLedgerOffloadDeletionLagInMillis time trigger ledger remove from bk
4. read failed from ledger with exception: No such ledger exists on Bookies
5. expire all messages in this ledger
6. reach retention.remove ledger from tiered-storage
### What did you expect to see?
ledger consumed success for this trimming ledger.
### What did you see instead?
no such ledger exists on bookies exception.
### Anything else?
_No response_
### Are you willing to submit a PR?
- [X] I'm willing to submit a PR!
Contributor guide
Assessment
This issue has not been assessed yet.