zymap commented on code in PR #15063:
URL: https://github.com/apache/pulsar/pull/15063#discussion_r861427743
##########
tiered-storage/jcloud/src/main/java/org/apache/bookkeeper/mledger/offload/jcloud/impl/BlockAwareSegmentInputStreamImpl.java:
##########
@@ -186,6 +275,10 @@ public void close() throws IOException {
entriesByteBuf.forEach(buf -> buf.release());
entriesByteBuf.clear();
}
+ if (paddingBuf.refCnt() != 0) {
Review Comment:
My bad. That is a test code and I push it accidentally. The root reason is
the close method called twice.
The close method will be triggered twice in the
BlobStoreManagedLedgerOffloader#offload method. The stream resource used by the
try-with block will be called the close. And through debug,
writeBlobStore.uploadMultipartPart in the offload method also will trigger the
close method.
--
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]