BewareMyPower commented on code in PR #25016:
URL: https://github.com/apache/pulsar/pull/25016#discussion_r2562708679


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java:
##########
@@ -4046,6 +4046,10 @@ public void readEntryComplete(Entry entry, Object ctx) {
                 } catch (Exception e) {
                     log.warn("[{}] [{}] Error while getting the oldest 
message", topic, cursor.toString(), e);
                     res.complete(false);
+                } finally {
+                    if (entry != null) {
+                        entry.release();
+                    }

Review Comment:
   I see. Though it's not a good practice to add special logic when `ml 
instanceof ManagedLedgerImpl`, it's okay to go ahead for now. I opened a 
follow-up issue: https://github.com/apache/pulsar/issues/25019



-- 
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