You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/08/26 02:39:46 UTC
[GitHub] [pulsar] zymap commented on a change in pull request #11782: [package management service] fix `wrappedBuffer` always using the same block of memory
zymap commented on a change in pull request #11782:
URL: https://github.com/apache/pulsar/pull/11782#discussion_r696244831
##########
File path: pulsar-package-management/bookkeeper-storage/src/main/java/org/apache/pulsar/packages/management/storage/bookkeeper/DLOutputStream.java
##########
@@ -58,11 +58,12 @@ private DLOutputStream(DistributedLogManager distributedLogManager, AsyncLogWrit
try {
int read = 0;
while ((read = inputStream.read(readBuffer)) != -1) {
- log.info("write something into the ledgers " + offset);
+ log.info("write something into the ledgers offset: {}, length: {}", offset, read);
ByteBuf writeBuf = Unpooled.wrappedBuffer(readBuffer, 0, read);
Review comment:
I think we can copy the bytes with `copiedBuffer`
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org