[ 
https://issues.apache.org/jira/browse/PHOENIX-1115?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rajeshbabu Chintaguntla updated PHOENIX-1115:
---------------------------------------------
    Attachment: PHOENIX-1115_v5.patch

Here is the patch addressing James comments.
Thanks for review. [~samarthjain] 
bq. I see that we start a new span when trace is turned on. Should the span be 
stopped when trace is turned off?
Yes the span will be stopped when trace turned off.

bq.  In the close() method of the ResultIterator returned by TraceQueryPlan, 
should we be executing the same code that is executed when we turn trace off.
No. It should not be. Otherwise the trace id we returned will be different 
trace id of the queries.

bq. What would happen if the user turns trace on, executes queries/mutations 
and just closes the connection without calling TRACE OFF?
We should stop the span while closing the connection if trace didn't turn off.
I have missed that in previous match. I have added now in the current patch.  

[~jamestaylor]
bq. If TRACE ON is called when tracing is already on, can we just return the 
trace ID of the currently open span (and not open a new one)? 
Yes, we return the currently open span.
bq. Seems like we'll want to ensure that the span is closed when the connection 
is closed, no?
Handled in the current patch.

> Provide a SQL command to turn tracing on/off
> --------------------------------------------
>
>                 Key: PHOENIX-1115
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1115
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: James Taylor
>            Assignee: Rajeshbabu Chintaguntla
>             Fix For: 5.0.0
>
>         Attachments: PHOENIX-1115.patch, PHOENIX-1115_v2.patch, 
> PHOENIX-1115_v3.patch, PHOENIX-1115_v4.patch, PHOENIX-1115_v5.patch, Screen 
> Shot 2014-11-21 at 3.41.41 PM.png, tracing_in_different_rdbms.pdf
>
>
> Provide a SQL command that turns tracing on and off. For example, Oracle has 
> this:
> {code}
> ALTER SESSION SET sql_trace = true;
> ALTER SESSION SET sql_trace = false;
> {code}
> We might consider allowing the sampling rate to be set as well.



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

Reply via email to