gaoran10 commented on code in PR #24522:
URL: https://github.com/apache/pulsar/pull/24522#discussion_r2213753998
##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/OpAddEntry.java:
##########
@@ -143,10 +153,14 @@ public void initiate() {
payloadProcessorHandle = ml.getManagedLedgerInterceptor()
.processPayloadBeforeLedgerWrite(this.getCtx(),
duplicateBuffer);
} catch (Exception e) {
+ ManagedLedgerException mle = new
ManagedLedgerException.ManagedLedgerInterceptException(e);
+ ml.interceptorException = mle;
ml.pendingAddEntries.remove(this);
ReferenceCountUtil.safeRelease(duplicateBuffer);
log.error("[{}] Error processing payload before ledger
write", ml.getName(), e);
- this.failed(new
ManagedLedgerException.ManagedLedgerInterceptException(e));
+ this.failed(mle);
+ // Don't recycle object here, see:
https://lists.apache.org/thread/po08w0tkhc7q8gc5khpdft6stxnr1v2y
+ // recycle();
Review Comment:
Same as the above case.
--
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]