-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[improve][broker] PIP-444: Rate limit for deleting ledger to alleviate the zk pressure. #24760
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[improve][broker] PIP-444: Rate limit for deleting ledger to alleviate the zk pressure. #24760
Conversation
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java
Outdated
Show resolved
Hide resolved
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java
Outdated
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedLedgerConfig.java
Outdated
Show resolved
Hide resolved
Denovo1998
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java
Outdated
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java
Outdated
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedLedgerConfig.java
Outdated
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java
Outdated
Show resolved
Hide resolved
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java
Outdated
Show resolved
Hide resolved
|
We do have batch operation to the metadata service. If the deletion option happened concurrently, it should be already batched in one request? |
I am afraid that there is no batch feature for |
ti Please enter the commit message for your changes. Lines starting
|
I think @codelipenghui mentioned this feature: #13043, while But from my perspective, the batching feature seems to be enabled by default, so I don't think it can resolve the issue mentioned in PIP-444 |
Only when the zk request is issued by broker can this feature takes effect and batch them to alleviate the zk pressure. However, in this case, the zk requests are sent by the bookie client. Therefore, I'm afraid feature #13043 cannot help resolve this issue. |
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java
Outdated
Show resolved
Hide resolved
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
Outdated
Show resolved
Hide resolved
managedLedgerDeleteThreadPoolSize.
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
Outdated
Show resolved
Hide resolved
|
Please update the original document #24771 as well, then you can start the vote |
Updated, and here is the link to the vote thread: https://lists.apache.org/thread/2dop6kyvrpt6ztz9pvylyl8o2syvh9kw. |
PIP: #24771
Motivation
When the retention of a large topic is reduced, a significant number of ledgers need to be deleted. Since this deletion operation is not rate-limited, it results in ZooKeeper (ZK) latency of several minutes, as shown below:

Modifications
Add rate limit feature for deleting ledgers.
Verifying this change
(Please pick either of the following options)
This change added tests and can be verified as follows:
(example:)
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: thetumbled#75