jangwind commented on a change in pull request #10326:
URL: https://github.com/apache/pulsar/pull/10326#discussion_r626633227
##########
File path:
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java
##########
@@ -3738,6 +3751,35 @@ public void setEntriesAddedCounter(long count) {
private static final Logger log =
LoggerFactory.getLogger(ManagedLedgerImpl.class);
+ @Override
+ public CompletableFuture<Void> asyncTruncate() {
+
+ final List<CompletableFuture<Void>> futures = Lists.newArrayList();
+ for (ManagedCursor cursor : cursors) {
+ final CompletableFuture<Void> future = new CompletableFuture<>();
+ cursor.asyncClearBacklog(new AsyncCallbacks.ClearBacklogCallback()
{
Review comment:
Thank you very much for your comments. I think ‘truncate' is more like
deleting all the messages than deleting the consumed messages. And I want to
add a 'trim' function to the next PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]