clintropolis commented on code in PR #16698:
URL: https://github.com/apache/druid/pull/16698#discussion_r1669873534


##########
processing/src/main/java/org/apache/druid/segment/writeout/TmpFileSegmentWriteOutMedium.java:
##########
@@ -43,21 +69,41 @@ public final class TmpFileSegmentWriteOutMedium implements 
SegmentWriteOutMedium
   @Override
   public WriteOutBytes makeWriteOutBytes() throws IOException
   {
-    File file = File.createTempFile("filePeon", null, dir);
-    FileChannel ch = FileChannel.open(
-        file.toPath(),
-        StandardOpenOption.READ,
-        StandardOpenOption.WRITE
+    return new LazilyAllocatingHeapWriteOutBytes(

Review Comment:
   yea im for the strategy in general, just kind of worried about the slightly 
larger memory footprint here without any form of escape hatch. This looks like 
it can grow up to 16k (up from the 4k heap buffer of the old 
`FileWriteOutBytes` buffer that has been replaced with a direct buffer in this 
PR). Its probably cool, I'm just being nervous.
   
   I was suggesting mostly just making a new thing and making it the default 
and leave the old thing just in case, but i can be convinced that this is close 
enough to not matter i think.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to