aloyszhang opened a new issue #12265:
URL: https://github.com/apache/pulsar/issues/12265
**Describe the bug**
Expiry based on ttl setting is not working as expected. If a topic has a
ledge which has no entry, like
```shelll
"ledgers" : [ {
"ledgerId" : 330530,
"entries" : 8576709,
"size" : 1020628371,
"offloaded" : false
}, {
"ledgerId" : 330569,
"entries" : 8285012,
"size" : 985916428,
"offloaded" : false
}, {
"ledgerId" : 330610,
"entries" : 5634479,
"size" : 670503001,
"offloaded" : false
}, {
"ledgerId" : 1702011,
"entries" : 0,
"size" : 0,
"offloaded" : false
} ]
```
the expiry will move the `MarkDeletePosition` on entry each time

**To Reproduce**
Steps to reproduce the behavior:
1. Create a topic and a subscription on this topic
2. Producer some messages and subscribe part of these messages
3. Unload this topic (make sure this topic has a newest ledger which does
not contain any entry)
4. See the expiry
**Expected behavior**
TTL should be expected when checking message expiry.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]