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

Benedict Elliott Smith commented on CASSANDRA-15241:
----------------------------------------------------

I've pushed some tiny nits 
[here|https://github.com/belliottsmith/cassandra/tree/15241-nits]

I'd also quite like to either switch to reporting _both_ queued time and 
running time, or just a consistent one of the two.  I don't mind hacking that 
in, as it's a very simple change.  Since we're mostly using {{approxTime}} the 
extra overhead is close to zero for NTR tasks to grab this as well; in fact we 
could probably reduce it by simply using {{approxTime}} for both, instead of 
{{nanoTime}} for start as we do today (plenty sufficient for timeouts).  

Alternatively we could just start reporting time, including queued time, for 
{{LocalReadRunnable}} and {{LocalMutationRunnable}} for free today, since the 
info is already there.

Any of the above works for me, but I would really like us to be consistent if 
that's ok by you?  Otherwise we'll always be code diving to figure out if a 
quoted number includes queued or not.

> Virtual table to expose current running queries
> -----------------------------------------------
>
>                 Key: CASSANDRA-15241
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-15241
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Feature/Virtual Tables
>            Reporter: Chris Lohfink
>            Assignee: Chris Lohfink
>            Priority: Normal
>
> Expose current running queries and their duration.
> {code}cqlsh> select * from system_views.queries;
>  thread_id                    | duration_micros | task
> ------------------------------+-----------------+---------------------------------------------------------------------------------
>  Native-Transport-Requests-17 |            6325 |                      QUERY 
> select * from system_views.queries; [pageSize = 100]
>   Native-Transport-Requests-4 |           14681 | EXECUTE 
> f4115f91190d4acf09e452637f1f2444 with 0 values at consistency LOCAL_ONE
>   Native-Transport-Requests-6 |           14678 | EXECUTE 
> f4115f91190d4acf09e452637f1f2444 with 0 values at consistency LOCAL_ONE
>                  ReadStage-10 |           16535 |                             
>                SELECT * FROM basic.wide1 LIMIT 5000
>                  ReadStage-13 |           16535 |                             
>                SELECT * FROM basic.wide1 LIMIT 5000
>                  ReadStage-14 |           16535 |                             
>                SELECT * FROM basic.wide1 LIMIT 5000
>                  ReadStage-19 |           11861 |                             
>                SELECT * FROM basic.wide1 LIMIT 5000
>                  ReadStage-20 |           11861 |                             
>                SELECT * FROM basic.wide1 LIMIT 5000
>                  ReadStage-22 |            7279 |                             
>                SELECT * FROM basic.wide1 LIMIT 5000
>                  ReadStage-23 |            4716 |                             
>                SELECT * FROM basic.wide1 LIMIT 5000
>                   ReadStage-5 |           16535 |                             
>                SELECT * FROM basic.wide1 LIMIT 5000
>                   ReadStage-7 |           16535 |                             
>                SELECT * FROM basic.wide1 LIMIT 5000
>                   ReadStage-8 |           16535 |                             
>                SELECT * FROM basic.wide1 LIMIT 5000{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to