[
https://issues.apache.org/jira/browse/HBASE-30038?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Wellington Chevreuil resolved HBASE-30038.
------------------------------------------
Fix Version/s: 2.6.6
Resolution: Fixed
Merged to master and cherry-picked into branch-3, branch-2 and branch-2.6.
Thanks for the contribution, [~dparikesit] !
> RefCnt Leak error when caching
> ------------------------------
>
> Key: HBASE-30038
> URL: https://issues.apache.org/jira/browse/HBASE-30038
> Project: HBase
> Issue Type: Bug
> Affects Versions: 3.0.0-beta-1, 2.6.5
> Reporter: Dimas Shidqi Parikesit
> Assignee: Dimas Shidqi Parikesit
> Priority: Critical
> Labels: pull-request-available
> Fix For: 3.0.0, 2.7.0, 2.6.6
>
>
> This bug is similar to
> [HBASE-28890|https://issues.apache.org/jira/browse/HBASE-28890]
> HFileBlock.Writer.getBlockForCaching() creates a ref-counted HFileBlock, and
> the caller must release its own reference after the cache has taken the
> ownership it needs.
> In HFileWriterImpl.java, the leak happened when shouldCacheBlock() returned
> before cacheFormatBlock.release() ran.
> In HFileBlockIndex.java, the intermediate-index path cached blockForCaching
> but never released the reference at all.
> Because these blocks can be backed by pooled off-heap ByteBuffs, repeated
> HFile writes could steadily drain allocator buffers and effectively leak
> memory, even though the blocks were only meant to live long enough to be
> considered for cache-on-write.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)