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

Chris Lohfink commented on CASSANDRA-11966:
-------------------------------------------

An example before/after with patch:

Before:
{code}
 activity                                                                       
                                       | timestamp                  | source    
| source_elapsed | client
-----------------------------------------------------------------------------------------------------------------------+----------------------------+-----------+----------------+-----------
                                                                                
                    Execute CQL3 query | 2016-06-07 22:19:39.982000 | 127.0.0.1 
|              0 | 127.0.0.1
                                                             Parsing select * 
from system.peers; [SharedPool-Worker-1] | 2016-06-07 22:19:39.984000 | 
127.0.0.1 |           2330 | 127.0.0.1
                                                                             
Preparing statement [SharedPool-Worker-1] | 2016-06-07 22:19:39.984000 | 
127.0.0.1 |           2579 | 127.0.0.1
                                                                       
Computing ranges to query [SharedPool-Worker-1] | 2016-06-07 22:19:39.984000 | 
127.0.0.1 |           2825 | 127.0.0.1
   Submitting range requests on 1 ranges with a concurrency of 1 (403.2 rows 
per range expected) [SharedPool-Worker-1] | 2016-06-07 22:19:39.984000 | 
127.0.0.1 |           2954 | 127.0.0.1
                                                           Submitted 1 
concurrent range requests [SharedPool-Worker-1] | 2016-06-07 22:19:39.985000 | 
127.0.0.1 |           3051 | 127.0.0.1
 Executing seq scan across 2 sstables for (min(-9223372036854775808), 
min(-9223372036854775808)) [SharedPool-Worker-2] | 2016-06-07 22:19:39.985000 | 
127.0.0.1 |           3172 | 127.0.0.1
                                                               Read 1 live and 
0 tombstone cells [SharedPool-Worker-2] | 2016-06-07 22:19:39.985000 | 
127.0.0.1 |           4015 | 127.0.0.1
                                                                                
                      Request complete | 2016-06-07 22:19:39.986322 | 127.0.0.1 
|           4322 | 127.0.0.1
                                                                                
                      
                                                                                
                      {code}

After:
{code}
 activity                                                                       
                                             | timestamp                  | 
source    | source_elapsed | client
-----------------------------------------------------------------------------------------------------------------------------+----------------------------+-----------+----------------+-----------
                                                                                
                          Execute CQL3 query | 2016-06-07 22:24:59.502000 | 
127.0.0.1 |              0 | 127.0.0.1
                                                           Parsing select * 
from system.peers; [Native-Transport-Requests-2] | 2016-06-07 22:24:59.503000 | 
127.0.0.1 |           1848 | 127.0.0.1
                                                                           
Preparing statement [Native-Transport-Requests-2] | 2016-06-07 22:24:59.503000 
| 127.0.0.1 |           2090 | 127.0.0.1
                                                                     Computing 
ranges to query [Native-Transport-Requests-2] | 2016-06-07 22:24:59.503000 | 
127.0.0.1 |           2396 | 127.0.0.1
 Submitting range requests on 1 ranges with a concurrency of 1 (604.8 rows per 
range expected) [Native-Transport-Requests-2] | 2016-06-07 22:24:59.504000 | 
127.0.0.1 |           2546 | 127.0.0.1
                                                         Submitted 1 concurrent 
range requests [Native-Transport-Requests-2] | 2016-06-07 22:24:59.504000 | 
127.0.0.1 |           2650 | 127.0.0.1
               Executing seq scan across 3 sstables for 
(min(-9223372036854775808), min(-9223372036854775808)) [ReadStage-1] | 
2016-06-07 22:24:59.504000 | 127.0.0.1 |           2751 | 127.0.0.1
                                                                             
Read 1 live and 0 tombstone cells [ReadStage-1] | 2016-06-07 22:24:59.505000 | 
127.0.0.1 |           3656 | 127.0.0.1
                                                                                
                            Request complete | 2016-06-07 22:24:59.506012 | 
127.0.0.1 |           4012 | 127.0.0.1

{code}


> When SEPWorker assigned work, set thread name to match pool
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-11966
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11966
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Observability
>            Reporter: Chris Lohfink
>            Assignee: Chris Lohfink
>            Priority: Minor
>
> Currently in traces, logs, and stacktraces you cant really associate the 
> thread name with the pool since its just "SharedWorker-#". Calling setName 
> around the task could improve logging and tracing a little while being a 
> cheap operation.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to