EungsopYoo commented on code in PR #7901:
URL: https://github.com/apache/hbase/pull/7901#discussion_r3167826124


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RowCache.java:
##########
@@ -110,16 +229,67 @@ boolean tryGetFromCache(RowCacheKey key, Get get, 
List<Cell> results) {
     }
 
     results.addAll(row.getCells());
-    // TODO: implement update of metrics
     return true;
   }
 
-  void populateCache(List<Cell> results, RowCacheKey key) {
-    // TODO: implement with barrier to avoid cache read during mutation
-    try {
-      rowCacheStrategy.cacheRow(key, new RowCells(results));
-    } catch (CloneNotSupportedException ignored) {
-      // Not able to cache row cells, ignore
-    }
+  void populateCache(HRegion region, List<Cell> results, RowCacheKey key) {

Review Comment:
   Done.
   
   - Renamed `populateCache` to `cache`.
   - Changed `regionLevelBarrierMap` key type from `HRegion` to the encoded 
region name (`String`). The encoded name is the canonical region identifier 
already used elsewhere (e.g., `RowCacheKey.isSameRegion`). As a result, `cache` 
no longer needs an `HRegion` parameter; it derives the encoded region name from 
the `RowCacheKey`.
   
   I kept the external signatures of `create/remove/getRegionLevelBarrier` 
taking `HRegion` to keep the caller's intent explicit; only the internal map 
key type changes. Let me know if you'd prefer those to take `String` as well.
   
   Commit: 
https://github.com/apache/hbase/pull/7901/commits/e985135e33694b93a8e210a48cdb4836fa95c305



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