HBASE-27365 Minimise block addition failures due to no space in bucket cache writers queue by introducing wait time-addendum
This commit is contained in:
parent
108479e95e
commit
0566f0cca5
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user