[
https://issues.apache.org/jira/browse/CASSANDRA-17062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17481851#comment-17481851
]
Aleksei Zotov commented on CASSANDRA-17062:
-------------------------------------------
Thanks for the feedback [~samt]!
> I don't see any harm in the all cache metrics including a
> {{{}weightedSize{}}}, for unweighted caches this is just equal to {{size}}
> and simply isn't included in the VT/nodetool output.
I think MBeans are also a part of the presentation layer (not only VT and
nodetool) since they are exposed to end users. I find "conditional MBean
attributes" (meaning they can be populated conditionally or treated
differently) to be very confusing. So I think having different entities for
different MBeans (`CacheMetrics` and `UnweightedCacheMetrics`) is smth clearer
to the end user. WDYT?
I've intentionally not brought `CacheSize`/`UnweightedCacheSize` into this
discussion. Let's come to a consensus on Mbeans at first.
> The only real difference between the types at this level is the units of
> size/capacity, which are not explicit and only referenced in comments.
Ideally I'd make a bigger refactoring with more expressive naming, etc, but I
do not feel it is justifiable to make a bigger change for such a simple ticket.
Especially I'm concerned with renaming old classes (possible conflicts
resolution going further) while keeping MBeans compatible (which is possible
though).
> As implemented, the mechanism of tracking hits/misses isn't correct.
Great catch! I was referencing to the logic implemented in
`InstrumentingCache`. However, it turned out that it uses uses `getIfPresent`
instead of `get` method, so does not experience the problem you described. Your
fix seems to be necessary and correct!
> Expose Auth Caches metrics
> --------------------------
>
> Key: CASSANDRA-17062
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17062
> Project: Cassandra
> Issue Type: Improvement
> Components: Feature/Virtual Tables, Observability/Metrics,
> Tool/nodetool
> Reporter: Aleksei Zotov
> Assignee: Aleksei Zotov
> Priority: Normal
> Fix For: 4.x
>
>
> Unlike to other caches (row, key, counter), Auth Caches lack some monitoring
> capabilities. Here are a few particular changes to get this inequity fixed:
> # Add auth caches to _system_views.caches_ VT
> # Expose auth caches metrics via JMX
> # Add auth caches details to _nodetool info_
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]