This is an automated email from the ASF dual-hosted git repository.
rajeshbabu pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2 by this push:
new 0566f0cca53 HBASE-27365 Minimise block addition failures due to no
space in bucket cache writers queue by introducing wait time-addendum
0566f0cca53 is described below
commit 0566f0cca53032829629dc35d17ce4677ffbb7cf
Author: Rajeshbabu Chintaguntla <[email protected]>
AuthorDate: Wed Oct 5 04:29:31 2022 +0530
HBASE-27365 Minimise block addition failures due to no space in bucket
cache writers queue by introducing wait time-addendum
---
.../org/apache/hadoop/hbase/io/hfile/CombinedBlockCache.java | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git
a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CombinedBlockCache.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CombinedBlockCache.java
index 358ee2057a2..4ad6dc3683f 100644
---
a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CombinedBlockCache.java
+++
b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CombinedBlockCache.java
@@ -53,11 +53,17 @@ public class CombinedBlockCache implements
ResizableBlockCache, HeapSize {
@Override
public void cacheBlock(BlockCacheKey cacheKey, Cacheable buf, boolean
inMemory) {
- boolean metaBlock = buf.getBlockType().getCategory() !=
BlockType.BlockCategory.DATA;
+ cacheBlock(cacheKey, buf, inMemory, false);
+ }
+
+ @Override
+ public void cacheBlock(BlockCacheKey cacheKey, Cacheable buf, boolean
inMemory,
+ boolean waitWhenCache) {
+ boolean metaBlock = isMetaBlock(buf.getBlockType());
if (metaBlock) {
l1Cache.cacheBlock(cacheKey, buf, inMemory);
} else {
- l2Cache.cacheBlock(cacheKey, buf, inMemory);
+ l2Cache.cacheBlock(cacheKey, buf, inMemory, waitWhenCache);
}
}