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
The retention is not working due to non closing ledger #6935
I have been researching the retention problem and high disk usage.
Currently the retention is defined to 2 hours, ttl 600 sec.
"managedLedgerMaxLedgerRolloverTimeMinutes" : "240",
"managedLedgerCursorRolloverTimeInSeconds" : "14400"
"managedLedgerCursorMaxEntriesPerLedger" : "50000"
"managedLedgerMaxEntriesPerLedger" : "50000",
pulsar version is 2.5.0
if i run bin/pulsar-admin topics stats-internal persistent://internal/eyecloud/test591-InputEvents i get the following output
If i understand the output correctly , the ledger was opened almost 1 day ago, it has more then 50000 entries and according to the policies should be closed.
This is relatively a big topic and allocated lot of disk space. i suspect that it's not deleted because the ledger is still opened. I see the same things on the other similar topics .
Is my assumption correct ?
What do you mean no incoming traffic ?
I think the limit of 50k entries and/or the limit of 240 minutes should cause to rollover. Am i right ?
Anyway, what the solution in this case? The topic has 8 Gb data bas doesn't have any incoming traffic , so the ledger is the open state. So the retention will not occur ever ?
Hi @sijie
Recently We upgraded to 2.5.1 but unfortunately it seems that the bug is non resolved.
The ledgers are still in open state and not deleted :(
We have some scenario when a producer send huge amount of messages in a short period to the topic and "closes" it and opens a new one.
such topic contains a lot of messages and because of the ledger is remained opened forever , the topic is stored forever. After a while ( few days) we found ourselves with full disks and failed pulsar.
Actually I succeeded to reproduce this bug . If i take one of the problematic topics and simply simulate a little activity by sending messages during few minutes, the ledgers is closed and recycled.
We need help:) That very critical bug for us and i think for other customers
I am working on a project with pulsar and I am facing the same issue when it comes to offloading the data to s3. The ledger doesnt seem to close.
Is there any update on when the fixed version would be released?
Hello @sijie
Recently, we have upgraded to pulsar 2.6.0 but unfortunately the issue still exists :(
It seems that the topic still is not deleted because of opened ledger.
I am just wondering if the fix has been merged into 2.6.0 ?
I
Thanks @alexku7 for the report and the reproduction steps. A current ledger that was never closed on an idle topic is now handled. #7111 added a scheduled rollover once managedLedgerMaxLedgerRolloverTimeMinutes is reached even without new writes. #11116 fixed the timing of that task (released in 2.7.3 and 2.8.1), which explains why it still failed for you on 2.6.0. #13073 (milestone 2.10.0) added managedLedgerInactiveLedgerRolloverTimeSeconds to close ledgers on inactive topics. Once the ledger is closed, retention can trim it. If you still see this on a currently supported release, please reopen or open a new issue.
Activity
sijie commentedon May 11, 2020
Which version of Pulsar are you using? Before 2.5.1, if there is no incoming traffic, the ledger rollover will not be triggered.
alexku7 commentedon May 11, 2020
Hi
We are using 2.5.0
What do you mean no incoming traffic ?
I think the limit of 50k entries and/or the limit of 240 minutes should cause to rollover. Am i right ?
Anyway, what the solution in this case? The topic has 8 Gb data bas doesn't have any incoming traffic , so the ledger is the open state. So the retention will not occur ever ?
alexku7 commentedon May 15, 2020
Hi @sijie
Recently We upgraded to 2.5.1 but unfortunately it seems that the bug is non resolved.
The ledgers are still in open state and not deleted :(
We have some scenario when a producer send huge amount of messages in a short period to the topic and "closes" it and opens a new one.
such topic contains a lot of messages and because of the ledger is remained opened forever , the topic is stored forever. After a while ( few days) we found ourselves with full disks and failed pulsar.
Actually I succeeded to reproduce this bug . If i take one of the problematic topics and simply simulate a little activity by sending messages during few minutes, the ledgers is closed and recycled.
We need help:) That very critical bug for us and i think for other customers
sijie commentedon May 18, 2020
@alexku7 I see. It seems that we need to make sure a ledger to be closed if there are no more incoming traffic to that topic.
sijie commentedon May 18, 2020
@alexku7 we will pick this item up to fix it for 2.6.0 release.
alexku7 commentedon May 19, 2020
Thank you @sijie
Do you know when the ver 2.6.0 is expected to be released ?
sijie commentedon May 19, 2020
@alexku7 it is coming this month. @codelipenghui is the release manager and is already starting on wrapping up the 2.6.0 release.
trexinc commentedon May 24, 2020
Simple instruction to replicate issue (replicates in 2.5.2 as well):
Create namespace internal/test with the following retention and TTL:
Then run in parallel for about five minutes the following (you can add -m 60000 to the producer):
The topic will then remain like this forever:
Trigger rollover when meeting maxLedgerRolloverTimeMinutes (#7111)
govardhan1194 commentedon Jun 10, 2020
Hey,
I am working on a project with pulsar and I am facing the same issue when it comes to offloading the data to s3. The ledger doesnt seem to close.
Is there any update on when the fixed version would be released?
Thanks in advance!
alexku7 commentedon Jul 11, 2020
Hello @sijie
Recently, we have upgraded to pulsar 2.6.0 but unfortunately the issue still exists :(
It seems that the topic still is not deleted because of opened ledger.
I am just wondering if the fix has been merged into 2.6.0 ?
I
Trigger rollover when meeting maxLedgerRolloverTimeMinutes (apache#7111)
Trigger rollover when meeting maxLedgerRolloverTimeMinutes (apache#7111)
merlimat commentedon Oct 23, 2026
Thanks @alexku7 for the report and the reproduction steps. A current ledger that was never closed on an idle topic is now handled. #7111 added a scheduled rollover once
managedLedgerMaxLedgerRolloverTimeMinutesis reached even without new writes. #11116 fixed the timing of that task (released in 2.7.3 and 2.8.1), which explains why it still failed for you on 2.6.0. #13073 (milestone 2.10.0) addedmanagedLedgerInactiveLedgerRolloverTimeSecondsto close ledgers on inactive topics. Once the ledger is closed, retention can trim it. If you still see this on a currently supported release, please reopen or open a new issue.