phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajeshbabu Chintaguntla (JIRA)" <>
Subject [jira] [Commented] (PHOENIX-1691) Allow settting sampling rate while enabling tracing.
Date Sat, 07 Mar 2015 02:27:38 GMT


Rajeshbabu Chintaguntla commented on PHOENIX-1691:

Thanks for review [~samarthjain]
bq.Looking at the code and the grammar changes, I am not sure how TRACE ON still works.
You are correct. The last minute change make it not work. Here is the proper grammar to make
it work. 
// Parse a trace statement.
trace_node returns [TraceStatement ret]
    :   TRACE (flag = ON  ( WITH SAMPLING s = sampling_rate)? | flag = OFF)
       {ret = factory.trace(Tracing.isTraceOn(flag.getText()), s == null ? Tracing.isTraceOn(flag.getText())
? 1.0 : 0.0 : (((BigDecimal)s.getValue())).doubleValue());}

bq. TRACE OFF WITH SAMPLING 0.5 should fail 
When we pass sampling to trace off query now query parsing itself fail. I will add test for

bq. How is the following case handled:
Currently what ever sampler first chosen sticking with that. I am thinking whether we can
throw exception in this case to suggest the user that already trace enabled and to change
the sampler rate disable the trace and enable with new sampling rate. What do you say?

> Allow settting sampling rate while enabling tracing.
> ----------------------------------------------------
>                 Key: PHOENIX-1691
>                 URL:
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: Rajeshbabu Chintaguntla
>            Assignee: Rajeshbabu Chintaguntla
>             Fix For: 5.0.0, 4.4
>         Attachments: PHOENIX-1691.patch
> Now we can dynamically enable/disable tracing from query. We should also be able to set
sampling rate while enabling tracing.

This message was sent by Atlassian JIRA

View raw message