You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "timveil (via GitHub)" <gi...@apache.org> on 2023/12/08 21:22:59 UTC

[I] Possible instances of `Channel` opened but not safely closed [pinot]

timveil opened a new issue, #12129:
URL: https://github.com/apache/pinot/issues/12129

   found three possible instances of a `Channel` being opened but not properly closed.   this could lead to resource leaks.
   
   for example, this...
   
   ```java
   try (RandomAccessFile randomAccessFile = new RandomAccessFile(file, "r")) {
     ...
     randomAccessFile.getChannel().read(duplicate, srcOffset);
   }
   ```
   
   should really be this...
   ```java
   try (RandomAccessFile randomAccessFile = new RandomAccessFile(file, "r");
       FileChannel channel = randomAccessFile.getChannel()) {
     ...
     channel.read(duplicate, srcOffset);
   }
   ```


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

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


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


Re: [I] Possible instances of `Channel` opened but not safely closed [pinot]

Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang closed issue #12129: Possible instances of `Channel` opened but not safely closed
URL: https://github.com/apache/pinot/issues/12129


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

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


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