BewareMyPower commented on issue #25019:
URL: https://github.com/apache/pulsar/issues/25019#issuecomment-3831093994

   We didn't find similar issues later but after a quick search I found a few 
places in the current code base
   
   Found 3 production code locations with ManagedLedgerImpl checks:
   1. PersistentTopic.java:2166
   if (managedLedger instanceof ManagedLedgerImpl ml) {
       checkMessageExpiryWithSharedPosition(ml, messageTtlInSeconds);
   } else {
       checkMessageExpiryWithoutSharedPosition(messageTtlInSeconds);
   }
   Uses getCursors().getCursorWithOldestPosition() which is only available on 
ManagedLedgerImpl (interface returns Iterable<ManagedCursor>).
   2. PersistentMessageExpiryMonitor.java:145  
   if (managedLedger instanceof ManagedLedgerImpl ml) {
       Optional<MLDataFormats.ManagedLedgerInfo.LedgerInfo> ledgerInfoOptional =
           ml.getOptionalLedgerInfo(messagePosition.getLedgerId());
       // ...
   }
   Uses getOptionalLedgerInfo() - this IS on the interface, so the check is 
unnecessary.
   3. MLTransactionLogImpl.java:121
   managedLedger, ((ManagedLedgerImpl) managedLedger).getExecutor(), ...
   Uses getExecutor() which is NOT on the interface, only on ManagedLedgerImpl.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to