Skip to content

Commit

Permalink
HBASE-22441 BucketCache NullPointerException in cacheBlock
Browse files Browse the repository at this point in the history
  • Loading branch information
binlijin committed May 27, 2019
1 parent 998b841 commit 5dcfe5f
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,10 @@ public static int validateBlockAddition(Cacheable existing, Cacheable newBlock,
public static boolean shouldReplaceExistingCacheBlock(BlockCache blockCache,
BlockCacheKey cacheKey, Cacheable newBlock) {
Cacheable existingBlock = blockCache.getBlock(cacheKey, false, false, false);
if (null == existingBlock) {
// Not exist now.
return true;
}
try {
int comparison = BlockCacheUtil.validateBlockAddition(existingBlock, newBlock, cacheKey);
if (comparison < 0) {
Expand Down

0 comments on commit 5dcfe5f

Please sign in to comment.