Copilot commented on code in PR #7001:
URL: https://github.com/apache/hbase/pull/7001#discussion_r2096061825
##########
hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/bucket/TestPrefetchWithBucketCache.java:
##########
@@ -139,15 +141,22 @@ public void testPrefetchDoesntOverwork() throws Exception
{
// Our file should have 6 DATA blocks. We should wait for all of them to
be cached
Waiter.waitFor(conf, 300, () -> bc.getBackingMap().size() == 6);
Map<BlockCacheKey, BucketEntry> snapshot =
ImmutableMap.copyOf(bc.getBackingMap());
- // Reads file again and check we are not prefetching it again
- LOG.debug("Second read, no prefetch should happen here.");
+ LruBlockCache l1 = (LruBlockCache) ((CombinedBlockCache)
blockCache).getFirstLevelCache();
+ assertEquals(1, l1.getBlockCount());
+ // Removes the meta block from L1 cache
+ l1.clearCache();
+ // Reads file again. Checks we are not prefetching data blocks again,
+ // but fetch back the meta blok
Review Comment:
Consider correcting the typographical error in the comment: 'meta blok'
should be 'meta block'.
```suggestion
// but fetch back the meta block
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]