poorbarcode commented on code in PR #25016:
URL: https://github.com/apache/pulsar/pull/25016#discussion_r2560288325
##########
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:
> But I don't understand why the implementation that extends
ManagedLedgerImpl does not have this issue. If so, should entry.release() here
be a duplicated release?
Because it will run another logic branch, see also
https://github.com/apache/pulsar/blob/master/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java#L2168
--
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]