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

Rushabh Shah commented on PHOENIX-6052:
---------------------------------------

> Otherwise, I think we don't need _syscattime_ and "{_}endTime + 
> syscattime{_}". Rather, we can keep _startTime_ at the beginning of 
> sendBatch(), and after all three sendMutations() calls are done, we can 
> calculate GLOBAL_MUTATION_COMMIT_TIME as "{_}endTime - startTime{_}". WDYT?

 

I like this idea. The original intention of the Jira was to capture time spent 
in validateServerTimestamps in GLOBAL_MUTATION_COMMIT_TIME. Lets not add a new 
metric.

 

I found one weird thing. We call validateAll (which internally calls 
validateAndGetServerTimestamp) for mutations which has validateServerTimestamps 
flag set to true 
[here|https://github.com/apache/phoenix/blob/master/phoenix-core/src/main/java/org/apache/phoenix/execute/MutationState.java#L1191]
 

 

For the mutations that doesn't have validateServerTimestamps flag set to true, 
we call validateServerTimestamps method 
[here|https://github.com/apache/phoenix/blob/master/phoenix-core/src/main/java/org/apache/phoenix/execute/MutationState.java#L1215]
 

If we are calling validateServerTimestamps for all the mutations, then what is 
the need for validateServerTimestamps boolean in MutationState#send method? 

[~mnpoonia] If the above statement makes sense then can you please cleanup that 
logic in your patch? 

Cc [~vjasani] 

> GLOBAL_MUTATION_COMMIT_TIME metric doesn't include the time spent in syscat 
> rpc's
> ---------------------------------------------------------------------------------
>
>                 Key: PHOENIX-6052
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-6052
>             Project: Phoenix
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 4.14.3
>            Reporter: Rushabh Shah
>            Assignee: Aman Poonia
>            Priority: Major
>
> Currently we measure the metric GLOBAL_MUTATION_COMMIT_TIME as the time spent 
> just in htable.batch rpc for base and index tables. 
> https://github.com/apache/phoenix/blob/master/phoenix-core/src/main/java/org/apache/phoenix/execute/MutationState.java#L1029-L1136
> We don't measure the time spent in 
> MutationState#validateAndGetServerTimestamp which makes rpc to SYSTEM.CATALOG 
> table and which is a part of commit phase.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to