HBASE-29669 Implement basic row cache#7901
HBASE-29669 Implement basic row cache#7901EungsopYoo wants to merge 1 commit intoapache:HBASE-29585from
Conversation
|
@wchevreuil By the way, it seems like CI is not working, do you know why? |
|
Hi, @EungsopYoo CI has been migrated from Jenkins to GitHub Actions, and the pre-commit GitHub Jenkins job should have been disabled, more details: https://lists.apache.org/thread/z6o5hhsd9goh5j7fcl4bnwzsktlwlwl4 Some previously created feature branches also have this issue; perhaps we could give it a try, such as: https://lists.apache.org/thread/hrl7dktkrb8zwwbv62my68lvtbplv7sr Thanks! |
|
|
||
| void removeTableLevelBarrier(HRegion region) { | ||
| regionLevelBarrierMap.computeIfPresent(region, (k, counter) -> { | ||
| int remaining = counter.decrementAndGet(); | ||
| return (remaining <= 0) ? null : counter; | ||
| }); | ||
| } |
There was a problem hiding this comment.
this method should be renamed by removeRegionLevelBarrier?
| // For testing only | ||
| void setRowCache(RowCache rowCache) { | ||
| this.rowCache = rowCache; | ||
| } |
There was a problem hiding this comment.
For testing only, we could use @RestrictedApi annotation?
| private BlockCache l2Cache = null; | ||
| private MobFileCache mobFileCache; | ||
| private CacheStats cacheStats; | ||
| private final RowCache rowCache; |
There was a problem hiding this comment.
better move to L71 under MobFileCache?
| RSRpcServices rsRpcServices = this.regionServer.getRSRpcServices(); | ||
| this.rowCache = rsRpcServices == null ? null : rsRpcServices.getServer().getRowCache(); |
There was a problem hiding this comment.
better to use a method initRowCache() here, just like blockcache and mobfilecache does?
| // The row cache for the region has been enabled again | ||
| rowCache.removeTableLevelBarrier(region); |
| @Category({ RegionServerTests.class, MediumTests.class }) | ||
| public class TestRowCache { | ||
| @ClassRule | ||
| public static final HBaseClassTestRule CLASS_RULE = | ||
| HBaseClassTestRule.forClass(TestRowCache.class); |
There was a problem hiding this comment.
For new tests, it is best to use JUnit5 directly, since existing unit tests are currently being migrated to JUnit5.
No description provided.