You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Hudson (Jira)" <ji...@apache.org> on 2026/02/04 16:25:00 UTC
[jira] [Commented] (HBASE-29857) BucketCache fails to start when persistence file was written with empty cache
[ https://issues.apache.org/jira/browse/HBASE-29857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18056489#comment-18056489 ]
Hudson commented on HBASE-29857:
--------------------------------
Results for branch branch-3
[build #519 on builds.a.o|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-3/519/]: (x) *{color:red}-1 overall{color}*
----
details (if available):
(/) {color:green}+1 general checks{color}
-- For more information [see general report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-3/519/General_20Nightly_20Build_20Report/]
(x) {color:red}-1 jdk17 hadoop3 checks{color}
-- For more information [see jdk17 report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-3/519/JDK17_20Nightly_20Build_20Report_20_28Hadoop3_29/]
(x) {color:red}-1 jdk17 hadoop 3.3.5 backward compatibility checks{color}
-- For more information [see jdk17 report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-3/519/JDK17_20Nightly_20Build_20Report_20_28Hadoop3_29/]
(x) {color:red}-1 jdk17 hadoop 3.3.6 backward compatibility checks{color}
-- For more information [see jdk17 report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-3/519/JDK17_20Nightly_20Build_20Report_20_28Hadoop3_29/]
(/) {color:green}+1 jdk17 hadoop 3.4.0 backward compatibility checks{color}
-- For more information [see jdk17 report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-3/519/JDK17_20Nightly_20Build_20Report_20_28Hadoop3_29/]
(/) {color:green}+1 jdk17 hadoop 3.4.1 backward compatibility checks{color}
-- For more information [see jdk17 report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-3/519/JDK17_20Nightly_20Build_20Report_20_28Hadoop3_29/]
(/) {color:green}+1 source release artifact{color}
-- See build output for details.
(/) {color:green}+1 client integration test for 3.3.5 {color}
(/) {color:green}+1 client integration test for 3.3.6 {color}
(/) {color:green}+1 client integration test for 3.4.0 {color}
(/) {color:green}+1 client integration test for 3.4.1 {color}
(/) {color:green}+1 client integration test for 3.4.2 {color}
> BucketCache fails to start when persistence file was written with empty cache
> -----------------------------------------------------------------------------
>
> Key: HBASE-29857
> URL: https://issues.apache.org/jira/browse/HBASE-29857
> Project: HBase
> Issue Type: Bug
> Components: regionserver
> Affects Versions: 3.0.0-beta-1, 2.6.3
> Reporter: rstest
> Assignee: rstest
> Priority: Critical
> Labels: pull-request-available
>
> When a RegionServer with BucketCache persistence enabled is restarted, if the BucketCache was empty at shutdown time, the new RegionServer fails to start with a `NullPointerException` in `BucketCache.parsePB()`.
>
> The bug is in the interaction between `BucketProtoUtils.serializeAsPB()` and `BucketCache.retrieveChunkedBackingMap()`:
> 1. During shutdown with empty cache: When `backingMap.size() == 0`, `serializeAsPB()` writes `numChunks = 0` to the persistence file, but the loop that writes `BucketCacheEntry` objects never executes (because there are no entries to iterate). This means no BucketCacheEntry is written to the file
> 2. During startup: `retrieveChunkedBackingMap()` reads `numChunks = 0` from the file, but still attempts to read the first chunk using `parseDelimitedFrom()`. Since no `BucketCacheEntry` was written, `parseDelimitedFrom()` returns `null`.
> 3. NPE occurs: The null `firstChunk` is passed to `parsePB()`, which calls `firstChunk.getDeserializersMap()` on the null object, causing NPE.
>
> This bug just make the region server not able to be restarted.
> I will provide a fix in PR and also a unit test that can reproduce the bug (if the fix is not applied).
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)