Xiangying

Il giorno mar 6 feb 2024 alle ore 13:01 Xiangying Meng
<xiangy...@apache.org> ha scritto:
>
> Dear Community,
>
> I hope this message finds you well. I am writing to discuss a modification
> to the behavior of deleting the current ledger. As you may know, in Pulsar,
> the current ledger cannot be deleted because it may still be written to.
> However, there is an exception. When the current ledger is rolled over, but
> no new messages are written, the current ledger does not change. In this
> case, the current ledger will not be written to, but it is also not deleted.

I understand the problem and I was surprised about it the first time I saw it.
The problem is that if you delete the ledger the next time a client
produces a message the broken
must open a new ledger and this is an operation that may take some
time, disrupting latency.

It is a trade-off, I know, in production you usually don't need to
release the disk space.
Maybe you have a use case in which you write a lot to a topic, then
you stop writing ?

Maybe you could "unload" the topic, and that will force a ledger
rollover (with an impact on latency)

Enrico

>
> This can be confusing for users, especially when they configure
> `managedLedgerMaxLedgerRolloverTimeMinutes` and `retentionTimeInMinutes`.
> They expect the current ledger to roll over and then be deleted after
> `managedLedgerMaxLedgerRolloverTimeMinutes` and `retentionTimeInMinutes`.
> However, in reality, while the current ledger does rollover, it is not
> deleted.
>
> The purpose of this discussion is to consider deleting the current ledger
> when it is rolled over. The specific implementation can be found at
> https://github.com/apache/pulsar/pull/22034.
>
> Looking forward to a productive discussion.
>
> Best Regards,
>
> xiangying

Reply via email to