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

Chinmay Kulkarni commented on PHOENIX-5981:
-------------------------------------------

Thanks for the review [~gjacoby]. I forgot to add a license header to the unit 
test. Will do that. The test failures seem unrelated to my changes, however I 
cannot seem to run this test locally without it stalling, let alone run all of 
IndexToolForNonTxGlobalIndexIT. [~skadam] mentioned that you are working on 
some of these fixes as part of 
https://issues.apache.org/jira/browse/PHOENIX-5973 which is not yet ported to 
master.

Can you please confirm whether the test failures above 
(ToolForNonTxGlobalIndexIT.testIndexToolForIncrementalVerify_viewIndex[mutable=true/false],
 
IndexToolForNonTxGlobalIndexIT.testIndexToolForIncrementalVerify[mutable=true/false])
are also on your radar for 5973? Till then, I will submit a 4.x patch to ensure 
Hadoop QA is green

> Wrong multiple counting of resultSetTimeMs and wallclockTimeMs in 
> OverallQueryMetrics
> -------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-5981
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-5981
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.15.0
>            Reporter: Chinmay Kulkarni
>            Assignee: Chinmay Kulkarni
>            Priority: Major
>              Labels: metrics, phoenix-hardening, quality-improvement
>             Fix For: 4.16.0
>
>         Attachments: PHOENIX-5981-master-v1.patch
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> We update wallClockTimeMS and resultSetTimeMS when we reach the last row in 
> our ResultSet iterations (see 
> [this|https://github.com/apache/phoenix/blob/dcc88af8acc2ba8df10d2e9d498ab3646fdf0a78/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixResultSet.java#L878-L881]).
>  However, this is also called inside PhoenixResultSet.close(), see 
> [this|https://github.com/apache/phoenix/blob/dcc88af8acc2ba8df10d2e9d498ab3646fdf0a78/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixResultSet.java#L214-L215].
> The problem is, these calls in-turn add elapsedTime again 
> ([endQuery|https://github.com/apache/phoenix/blob/dcc88af8acc2ba8df10d2e9d498ab3646fdf0a78/phoenix-core/src/main/java/org/apache/phoenix/monitoring/OverAllQueryMetrics.java#L86]
>  and 
> [stopResultsetWatch|https://github.com/apache/phoenix/blob/dcc88af8acc2ba8df10d2e9d498ab3646fdf0a78/phoenix-core/src/main/java/org/apache/phoenix/monitoring/OverAllQueryMetrics.java#L95])
>  and so these metrics get 2X the value they should. Ideally we should change 
> the metrics only if the stopWatch was running before calling stopWatch.stop 
> or else we will count it multiple times.



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

Reply via email to