Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1019,6 +1019,15 @@ public void testReaderWithLruCombinedBlockCache() throws Exception {
testReaderCombinedCache("LRU");
}

/**
* Tet case for HBASE-27995
*/
@Test
public void testReaderWithAdaptiveLruCombinedBlockCacheWithHardCapacityLimit() throws Exception {
conf.setDouble(LruAdaptiveBlockCache.LRU_HARD_CAPACITY_LIMIT_FACTOR_CONFIG_NAME, -0.4921875);
testReaderWithAdaptiveLruCombinedBlockCache();
}

private void testReaderCombinedCache(final String l1CachePolicy) throws Exception {
int bufCount = 1024;
int blockSize = 64 * 1024;
Expand Down Expand Up @@ -1049,7 +1058,9 @@ private void testReaderCombinedCache(final String l1CachePolicy) throws Exceptio
Assert.assertFalse(hfb.isSharedMem());
}
} finally {
cachedBlock.release();
if (null != cachedBlock) {
cachedBlock.release();
}
}
block.release(); // return back the ByteBuffer back to allocator.
}
Expand Down