[ https://issues.apache.org/jira/browse/HBASE-28900?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Wellington Chevreuil resolved HBASE-28900. ------------------------------------------ Resolution: Fixed Merged to master, branch-3, branch-2 and cherry-picked into branch-2.6. > Avoid resetting bucket cache during restart if inconsistency is observed for > some blocks. > ----------------------------------------------------------------------------------------- > > Key: HBASE-28900 > URL: https://issues.apache.org/jira/browse/HBASE-28900 > Project: HBase > Issue Type: Bug > Components: BucketCache > Affects Versions: 2.6.0, 3.0.0-beta-1, 2.7.0 > Reporter: Janardhan Hungund > Assignee: Janardhan Hungund > Priority: Major > Labels: pull-request-available > Fix For: 3.0.0, 2.7.0, 2.6.2 > > > During the execution of persistence of backing map into the persistence file, > the backing map is not guarded by a lock against caching of blocks and block > evictions. > Hence, some of the block entries in the backing map in persistence may not be > consistent with the bucket cache. > During, the retrieval of the backing map from persistence if an inconsistency > is detected, the complete bucket cache is discarded and is rebuilt. > One of the errors, seen, is, as mentioned below: > {code:java} > 2024-09-30 08:58:33,840 WARN > org.apache.hadoop.hbase.io.hfile.bucket.BucketCache: Can't restore from > file[/hadoopfs/ephfs1/bucketcache.map]. The bucket cache will be reset and > rebuilt. Exception seen: > org.apache.hadoop.hbase.io.hfile.bucket.BucketAllocatorException: Couldn't > find match for index 26 in free list > at > org.apache.hadoop.hbase.io.hfile.bucket.BucketAllocator$Bucket.addAllocation(BucketAllocator.java:140) > at > org.apache.hadoop.hbase.io.hfile.bucket.BucketAllocator.<init>(BucketAllocator.java:406) > at > org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.retrieveFromFile(BucketCache.java:1486) > at > org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.lambda$startPersistenceRetriever$0(BucketCache.java:377) > at java.base/java.lang.Thread.run(Thread.java:840) {code} > This retrieval can be optimised to only discard the inconsistent entries in > the persistent backing map and retain the remaining entries. The bucket cache > validator will throw away the inconsistent entry from the backing map. > Thanks, > Janardhan -- This message was sent by Atlassian Jira (v8.20.10#820010)