Skip to content

Commit 2ebf255

Browse files
jhungundwchevreuil
authored andcommitted
HBASE-28804: Implement asynchronous retrieval of bucket-cache data from persistence (#6182) (#6219)
The cherry-pick of HBASE-29727 into branch-2.6 accidently brought most of HBASE-28804 into branch-2, this is to backport the remaining original change in HBASE-28804. Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org> Change-Id: I816141ccebf91191aaa4cb6afa04343b64663eb0
1 parent 90a6a8f commit 2ebf255

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFilePreadReader.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ public class HFilePreadReader extends HFileReaderImpl {
3737
public HFilePreadReader(ReaderContext context, HFileInfo fileInfo, CacheConfig cacheConf,
3838
Configuration conf) throws IOException {
3939
super(context, fileInfo, cacheConf, conf);
40+
cacheConf.getBlockCache()
41+
.ifPresent(cache -> cache.waitForCacheInitialization(WAIT_TIME_FOR_CACHE_INITIALIZATION));
42+
4043
// Initialize HFileInfo object with metadata for caching decisions
4144
fileInfo.initMetaAndIndex(this);
4245
// master hosted regions, like the master procedures store wouldn't have a block cache

0 commit comments

Comments
 (0)