BewareMyPower commented on code in PR #25016:
URL: https://github.com/apache/pulsar/pull/25016#discussion_r2560171896
##########
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:
It should be the callback's responsibility to release the entry buffer, so
this change makes sense.
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?
--
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]