[
https://issues.apache.org/jira/browse/HBASE-30454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18125282#comment-18125282
]
Hudson commented on HBASE-30454:
--------------------------------
Results for branch branch-2
[build #1492 on
builds.a.o|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2/1492/]:
(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-2/1492/General_20Nightly_20Build_20Report/]
(x) {color:red}-1 jdk8 hadoop2 checks{color}
-- For more information [see jdk8 (hadoop2)
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2/1492/JDK8_20Nightly_20Build_20Report_20_28Hadoop2_29/]
(x) {color:red}-1 jdk8 hadoop3 checks{color}
-- For more information [see jdk8 (hadoop3)
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2/1492/JDK8_20Nightly_20Build_20Report_20_28Hadoop3_29/]
(x) {color:red}-1 jdk11 hadoop3 checks{color}
-- For more information [see jdk11
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2/1492/JDK11_20Nightly_20Build_20Report_20_28Hadoop3_29/]
(x) {color:red}-1 jdk17 hadoop3 checks{color}
-- For more information [see jdk17
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2/1492/JDK17_20Nightly_20Build_20Report_20_28Hadoop3_29/]
(x) {color:red}-1 jdk21 hadoop3 checks{color}
-- For more information [see jdk21
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2/1492/JDK21_20Nightly_20Build_20Report_20_28Hadoop3_29/]
> BucketCache persistence recovery downgrades MULTI blocks to SINGLE
> ------------------------------------------------------------------
>
> Key: HBASE-30454
> URL: https://issues.apache.org/jira/browse/HBASE-30454
> Project: HBase
> Issue Type: Bug
> Affects Versions: 3.0.0, 2.7.0, 2.6.7
> Reporter: Julian Chandra Sutadi
> Assignee: Julian Chandra Sutadi
> Priority: Major
> Labels: pull-request-available
> Fix For: 2.7.0, 3.1.0, 2.6.8
>
>
> HBASE-29667 reported that blocks written into the BucketCache were
> initialized with MULTI priority instead of SINGLE, so the SINGLE to MULTI
> promotion on re-access never took effect. The issue was fixed by initializing
> non-memory blocks as SINGLE in the BucketEntry constructor.
> However, when the cache is restored from its persistence file
> (BucketProtoUtils.fromPB), the BucketEntry is rebuilt from its boolean
> inMemory instead of the saved priority. The constructor sets MEMORY if
> inMemory is true and SINGLE otherwise, so a persisted MULTI block comes back
> as SINGLE. After a restart, frequently accessed blocks silently lose their
> MULTI status and are more likely to be evicted until they are read again.
> {code:java}
> // BucketProtoUtils.toPB(BucketEntry): saves all three priorities
> .setPriority(toPB(entry.getPriority()))
> // BucketProtoUtils.fromPB: reduces the priority to a boolean
> new BucketEntry(..., protoValue.getCachedTime(),
> protoValue.getPriority() == BucketCacheProtos.BlockPriority.memory, //
> inMemory
> createRecycler, ByteBuffAllocator.HEAP);
> // BucketEntry constructor (fixed by HBASE-29667)
> this.priority = inMemory ? BlockPriority.MEMORY : BlockPriority.SINGLE;
> {code}
> The suggested fix is to restore the enum directly, mirroring the existing
> toPB(BlockPriority). We will submit the fix proposal soon.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)