315157973 commented on a change in pull request #12045: URL: https://github.com/apache/pulsar/pull/12045#discussion_r709123995
########## File path: managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java ########## @@ -2108,17 +2111,7 @@ void doCacheEviction(long maxTimestamp) { } private PositionImpl getEarlierReadPositionForActiveCursors() { - PositionImpl smallest = null; - for (ManagedCursor cursor : activeCursors) { - PositionImpl p = (PositionImpl) cursor.getReadPosition(); - if (smallest == null) { - smallest = p; - } else if (p.compareTo(smallest) < 0) { - smallest = p; - } - } - - return smallest; + return (PositionImpl) (activeCursors.getSlowestReader()).getReadPosition(); Review comment: You are right, now it seems to ignore the non-durable cursor -- 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. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org