[ 
https://issues.apache.org/jira/browse/CASSANDRA-5746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13705205#comment-13705205
 ] 

Jonathan Ellis commented on CASSANDRA-5746:
-------------------------------------------

If we want it to be fast enough for monitoring use, we need to denormalize the 
count.  So the question is, do we use a Counters table, a normal int table with 
manual lock-and-read-before-write, or just one-off it with AtomicInteger and 
sync to disk occasionally? 

Personally I'd be inclined towards the last; it's okay if under- or over-count 
(because of periodic CL sync for instance), as long as we reliably distinguish 
between zero and non-zero hints for a given target.  We could sanity check that 
with an approach like listEndpointsPendingHints on startup, which would be 
fairly low-overhead.
                
> HHOM.countPendingHints is a trap for the unwary
> -----------------------------------------------
>
>                 Key: CASSANDRA-5746
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5746
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core, Tools
>            Reporter: Jonathan Ellis
>            Assignee: Tyler Hobbs
>             Fix For: 2.0.1
>
>
> countPendingHints can OOM the server fairly easily since it does a per-target 
> seq scan without paging.
> More generally, countPendingHints is far too slow to be useful for routine 
> monitoring.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to