Copilot commented on code in PR #8844:
URL: https://github.com/apache/hbase/pull/8844#discussion_r4520336852


##########
hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestScannerSelectionUsingKeyRange.java:
##########
@@ -117,17 +120,18 @@ public void testScannerSelection() throws IOException {
     }
 
     Scan scan = new 
Scan().withStartRow(Bytes.toBytes("aaa")).withStopRow(Bytes.toBytes("aaz"));
-    BlockCache cache = BlockCacheFactory.createBlockCache(conf);
+    CacheAccessService cache = CacheAccessServices.fromConfiguration(conf);

Review Comment:
   This creates a separate cache that the region never uses, so the scan cannot 
populate the cache inspected by the assertion. Since every `expectedCount` is 
zero, the assertion passes even if scanner selection starts reading excluded 
files. Create the service before the region and pass it to the 
`createRegionAndWAL(..., CacheAccessService)` overload so the assertion 
observes the scan's cache.



-- 
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]

Reply via email to