[
https://issues.apache.org/jira/browse/HBASE-30454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18124562#comment-18124562
]
Hudson commented on HBASE-30454:
--------------------------------
Results for branch branch-3
[build #172 on
builds.a.o|https://ci-hbase.apache.org/job/HBase-Integration-Test/job/branch-3/172/]:
(/) *{color:green}+1 overall{color}*
----
details (if available):
(/) {color:green}+1 client integration test for 3.3.5 {color}
(/) {color:green}+1 client integration test for 3.3.5 with shaded hadoop
client{color}
(/) {color:green}+1 client integration test for 3.3.6 {color}
(/) {color:green}+1 client integration test for 3.3.6 with shaded hadoop
client{color}
(/) {color:green}+1 client integration test for 3.4.0 {color}
(/) {color:green}+1 client integration test for 3.4.0 with shaded hadoop
client{color}
(/) {color:green}+1 client integration test for 3.4.1 {color}
(/) {color:green}+1 client integration test for 3.4.1 with shaded hadoop
client{color}
(/) {color:green}+1 client integration test for 3.4.2 {color}
(/) {color:green}+1 client integration test for 3.4.2 with shaded hadoop
client{color}
(/) {color:green}+1 client integration test for 3.4.3 {color}
(/) {color:green}+1 client integration test for 3.4.3 with shaded hadoop
client{color}
> 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: 3.1.0
>
>
> 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)