Revert "Change rollCurrentLedgerIfFull logic to follow lazy creation of ledger (#14672) - #16806
Conversation
BewareMyPower
left a comment
There was a problem hiding this comment.
we will maintain a lot of useless data if the topic is no longer being used
Could you add a test for it?
|
I found |
BewareMyPower
left a comment
There was a problem hiding this comment.
testGetNumberOfEntriesInStorage also failed. I think it's caused by the behavior change. BTW, we should verify the managed ledger's state, which should be LedgerOpened instead of LedgerClosed.
@mattisonchao @BewareMyPower How about through the PR #15474 fix those unit test and achieve the same effect like revert. |
|
@Nicklee007 I will take a look |
We can fix this test to satisfy this revert. |
…ure (#16685) Master Issue: #15370 ### Motivation see #15370 ### Modifications I will complete proposal #15370 with these pull requests( *current pull request is the step-3* ): 1. Write the batch transaction log handler: `TxnLogBufferedWriter` 2. Configuration changes and protocol changes. 3. Transaction log store enables the batch feature. 4. Pending ack log store enables the batch feature. 5. Supports dynamic configuration. 6. Append admin API for transaction batch log and docs( admin and configuration doc ). 7. Append metrics support for transaction batch log.
|
@mattisonchao Please provide a correct documentation label for your PR. |
Motivation
The last created topic ledger will be never removed because the trimming strategy will not remove the current ledger. In such a scenario, we will maintain a lot of useless data if the topic is no longer being used. Moreover, it may cause disk problems if we keep a lot mount of discarded topics in the cluster.
Modifications
rollCurrentLedgerIfFulllogic to follow lazy creation of ledger #14672Verifying this change
Documentation
doc-not-needed(Please explain why)