You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Sanjay Malakar (Jira)" <ji...@apache.org> on 2026/09/08 23:59:00 UTC

[jira] [Updated] (HBASE-30345) Ensure FileIOEngine.shutdown() closes every backing file

     [ https://issues.apache.org/jira/browse/HBASE-30345?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sanjay Malakar updated HBASE-30345:
-----------------------------------
    Status: Patch Available  (was: Open)

https://github.com/apache/hbase/pull/8582

> Ensure FileIOEngine.shutdown() closes every backing file
> --------------------------------------------------------
>
>                 Key: HBASE-30345
>                 URL: https://issues.apache.org/jira/browse/HBASE-30345
>             Project: HBase
>          Issue Type: Bug
>          Components: BucketCache
>    Affects Versions: 2.6.7
>            Reporter: Sanjay Malakar
>            Priority: Major
>              Labels: pull-request-available
>
> {{org.apache.hadoop.hbase.io.hfile.bucket.FileIOEngine.shutdown()}} closes the \{{java.nio.channels.FileChannel}} and the \{{java.io.RandomAccessFile}} for each backing file inside a single \{{try}} block. If \{{java.nio.channels.FileChannel.close()}} throws \{{{}java.io.IOException{}}}, the matching \{{java.io.RandomAccessFile.close()}} is skipped and that file handle is leaked. \{{shutdown()}} is also invoked from the \{{FileIOEngine}} constructor's failure path, so a partially initialized engine leaks the same way.
> {\{org.apache.hadoop.hbase.io.hfile.bucket.FileIOEngine.shutdown()}} should close each resource independently so that a failure closing one does not prevent the attempt to close the other, keeping its current behaviour of logging the \{{java.io.IOException}} rather than throwing it.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)