This is an automated email from the ASF dual-hosted git repository.

mmerli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new 7ec1d543280 [imp][managed-ledger] Optimize filterReadEntries usage of 
Entry interface ledger (#17108)
7ec1d543280 is described below

commit 7ec1d5432804a75f76d66a9d13186f299c317168
Author: Michael Marshall <mmarsh...@apache.org>
AuthorDate: Tue Aug 16 13:47:00 2022 -0500

    [imp][managed-ledger] Optimize filterReadEntries usage of Entry interface 
ledger (#17108)
---
 .../java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java    | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git 
a/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java
 
b/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java
index 8e74f32037f..ef1c25f458e 100644
--- 
a/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java
+++ 
b/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java
@@ -2288,9 +2288,7 @@ public class ManagedCursorImpl implements ManagedCursor {
             } else {
                 // Remove from the entry list all the entries that were 
already marked for deletion
                 return Lists.newArrayList(Collections2.filter(entries, entry 
-> {
-                    boolean includeEntry = !individualDeletedMessages.contains(
-                            ((PositionImpl) entry.getPosition()).getLedgerId(),
-                            ((PositionImpl) entry.getPosition()).getEntryId());
+                    boolean includeEntry = 
!individualDeletedMessages.contains(entry.getLedgerId(), entry.getEntryId());
                     if (!includeEntry) {
                         if (log.isDebugEnabled()) {
                             log.debug("[{}] [{}] Filtering entry at {} - 
already deleted", ledger.getName(), name,

Reply via email to