timveil commented on code in PR #12130:
URL: https://github.com/apache/pinot/pull/12130#discussion_r1425611488


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/creator/impl/inv/RangeIndexCreator.java:
##########
@@ -321,6 +322,7 @@ public void seal()
     try (BufferedOutputStream bos = new BufferedOutputStream(new 
FileOutputStream(_rangeIndexFile));
         DataOutputStream header = new DataOutputStream(bos);
         FileOutputStream fos = new FileOutputStream(_rangeIndexFile);

Review Comment:
   @Jackie-Jiang  wouldn't something like this be more sensible?
   
   ```
       try (FileOutputStream fos = new FileOutputStream(_rangeIndexFile);
           FileChannel channel = fos.getChannel();
           BufferedOutputStream bos = new BufferedOutputStream(fos);
           DataOutputStream header = new DataOutputStream(bos);
           DataOutputStream dataOutputStream = new DataOutputStream(bos)) {
   ```



-- 
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-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to