diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/LruBlockCache.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/LruBlockCache.java index 5ff3edb946d..99463178ab3 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/LruBlockCache.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/LruBlockCache.java @@ -302,7 +302,6 @@ public class LruBlockCache implements BlockCache, HeapSize { String msg = "Cached an already cached block: " + cacheKey + " cb:" + cb.getCacheKey(); msg += ". This is harmless and can happen in rare cases (see HBASE-8547)"; LOG.warn(msg); - assert false : msg; return; } cb = new CachedBlock(cacheKey, buf, count.incrementAndGet(), inMemory); diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestLruBlockCache.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestLruBlockCache.java index dbe03c40c41..8b17f5a1447 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestLruBlockCache.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestLruBlockCache.java @@ -118,17 +118,6 @@ public class TestLruBlockCache { assertEquals(buf.heapSize(), block.heapSize()); } - // Re-add same blocks and ensure nothing has changed - for (CachedItem block : blocks) { - try { - cache.cacheBlock(block.cacheKey, block); - assertTrue("Cache should not allow re-caching a block", false); - } catch(AssertionError re) { - // expected - assertTrue(re.getMessage().contains("Cached an already cached block")); - } - } - // Verify correctly calculated cache heap size assertEquals(expectedCacheSize, cache.heapSize());