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

Ankit Singhal edited comment on PHOENIX-2412 at 11/13/15 2:05 PM:
------------------------------------------------------------------

as far as I checked ,as per below code Multiple close to wrapper iterator is 
causing metrics to get duplicated . Attached patch will fix it. 

MutatingParallelIteratorFactory.java
{code}
            @Override
            public void close() throws SQLException {
                try {
                    /* 
                     * Join the child mutation states in close, since this is 
called in a single threaded manner
                     * after the parallel results have been processed. 
                     * If auto-commit is on for the cloned child connection, 
then the finalState here is an empty mutation 
                     * state (with no mutations). However, it still has the 
metrics for mutation work done by the 
                     * mutating-iterator. Joining the mutation state makes sure 
those metrics are passed over
                     * to the parent connection.
                     */ 
                    
MutatingParallelIteratorFactory.this.connection.getMutationState().join(finalState);
                } finally {
                    clonedConnection.close();
                }
            }
{code}


All IT tests are passing now.



was (Author: ankit.singhal):
as far as I checked ,as per below code Multiple close to wrapper iterator is 
causing metrics to get duplicated . Attached patch may fix it. 

MutatingParallelIteratorFactory.java
{code}
            @Override
            public void close() throws SQLException {
                try {
                    /* 
                     * Join the child mutation states in close, since this is 
called in a single threaded manner
                     * after the parallel results have been processed. 
                     * If auto-commit is on for the cloned child connection, 
then the finalState here is an empty mutation 
                     * state (with no mutations). However, it still has the 
metrics for mutation work done by the 
                     * mutating-iterator. Joining the mutation state makes sure 
those metrics are passed over
                     * to the parent connection.
                     */ 
                    
MutatingParallelIteratorFactory.this.connection.getMutationState().join(finalState);
                } finally {
                    clonedConnection.close();
                }
            }
{code}


Almost 

> Fix test failures due to use of priority queue for merge sort
> -------------------------------------------------------------
>
>                 Key: PHOENIX-2412
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2412
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: James Taylor
>            Assignee: Ankit Singhal
>         Attachments: PHOENIX-2412_v1.patch
>
>
> Looks like PHOENIX-2377 caused some test failures. Did you run all the unit 
> tests (mvn verify) with your patch locally, [~ankit.singhal]?
> {code}
> Failed tests:
>   
> PhoenixMetricsIT.testMetricsForUpsertSelectSameTable:615->assertMetricsAreSame:643->assertMetricsHaveSameValues:654
>  Unequal values for metric MUTATION_BYTES expected:<5600> but was:<16240>
>   
> PhoenixMetricsIT.testMetricsForUpsertSelectWithAutoCommit:462->assertMetricsAreSame:643->assertMetricsHaveSameValues:654
>  Unequal values for metric MUTATION_BYTES expected:<5600> but was:<16240>
> {code}



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

Reply via email to