This message was deleted.
# general
s
This message was deleted.
y
do you have topic stats?
d
I know it is a bit of a cliche, but given that you are running a really old version of Pulsar, you might want to consider upgrading to 2.10.x +
Also, please share topic-stats-internal. When I have seen this situation in the past, it is often the case where there are some gaps in the message acknowledgements. This results in the ledgers with the missing acks being retained, which leads to a large storage size and backlog size
👍 1
n
After much fiddling I found out that the topics with large storage sizes had one or two messages from 2022. And I’m guessing the consumers were not able to process/ack them. So after skipping those messages the backlog storage size went from 150GB to 16GB.
How did 1 or 2 messages inflate the backlog storage size like this ? Does backlog storage size increase with failed acknowledgments or retries ?
d
When a message isn't acknowledged, then the entire ledger has to be retained. A ledger contains 50k messages, which can be many MB in size.
If that happens across multiple ledgers/messages then the backlog size can get quiet largw
n
I would have to understand how a message is stored in the ledger. It was just one message. Does this mean that if a message from 2022 isn't acknowledged, then all the messages since that message are retained until that one is acknowledge/skipped ?
d
By default, each ledger is allowed to grow to ~50k entries before it is closed, and put into read-only mode. If you have batching enabled on the producer, than each “entry” contains not one, but several messages. Therefore the potential size in terms of message count (backlog), and physical storage can be very big. Now, in a missing ack scenario where one of these entries were delivered but never ack’ed, the entire ledger itself MUST be retained. This is because it is an append-only log. So even a single unack’ed message could result in a backlog of a ~500k messages (with an average batching size of 10), and a storage size of 5-6GB depending on the message size. This effect can easily compound if there are multiple ledgers with unack’ed messages.