Skip to content

Commit 54a8230

Browse files
committed
HBASE-27365 Minimise block addition failures due to no space in bucket cache writers queue by introducing wait time - addendum added mistakenly removed in-memory flag
1 parent ced1d64 commit 54a8230

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1342,7 +1342,8 @@ public HFileBlock readBlock(long dataBlockOffset, long onDiskBlockSize, final bo
13421342
cacheConf.getBlockCache().ifPresent(cache -> {
13431343
if (cacheBlock && cacheConf.shouldCacheBlockOnRead(category)) {
13441344
// Using the wait on cache during compaction and prefetching.
1345-
cache.cacheBlock(cacheKey, cacheCompressed ? hfileBlock : unpacked, cacheOnly);
1345+
cache.cacheBlock(cacheKey, cacheCompressed ? hfileBlock : unpacked,
1346+
cacheConf.isInMemory(), cacheOnly);
13461347
}
13471348
});
13481349
if (unpacked != hfileBlock) {

hbase-server/src/test/resources/hbase-site.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@
279279
</property>
280280
<property>
281281
<name>hbase.bucketcache.queue.addition.waittime</name>
282-
<value>100</value>
282+
<value>1000</value>
283283
<description>Default is 0</description>
284284
</property>
285285
</configuration>

0 commit comments

Comments
 (0)