VladRodionov commented on code in PR #8575:
URL: https://github.com/apache/hbase/pull/8575#discussion_r3890464489
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/cache/DefaultHBaseCachePlacementAdmissionPolicy.java:
##########
@@ -60,7 +63,7 @@ public TierDecision selectTier(BlockCacheKey cacheKey,
Cacheable block, CacheWri
* L2 when both tiers are available, but falls back to any available tier
rather than rejecting
* placement.
*/
- if (topologyView.getType() == CacheTopologyType.SINGLE) {
+ if (topologyView.getType() == CacheTopologyType.SINGLE_TIER) {
return TierDecision.single(CacheTier.SINGLE);
Review Comment:
I think keeping `CacheTier.SINGLE` is intentional here.
`SINGLE_TIER` describes topology cardinality: there is only one active cache
engine. That engine is
not necessarily semantically L1. For example, a configuration may use only
`BucketCache`, in which
case treating the only engine as L1 would be misleading.
So the model is:
* `CacheTopologyType.SINGLE_TIER` uses `CacheTier.SINGLE`
* `CacheTopologyType.TIERED_EXCLUSIVE` uses `CacheTier.L1` and `CacheTier.L2`
* `CacheTopologyType.TIERED_INCLUSIVE` uses `CacheTier.L1` and `CacheTier.L2`
I updated the single-tier code paths to consistently resolve
`CacheTier.SINGLE`.
--
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]