Github user karanmehta93 commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/338#discussion_r214200370
  
    --- Diff: 
phoenix-core/src/main/java/org/apache/phoenix/jdbc/LoggingPhoenixStatement.java 
---
    @@ -59,4 +70,17 @@ public ResultSet getGeneratedKeys() throws SQLException {
             return new LoggingPhoenixResultSet(super.getGeneratedKeys(), 
phoenixMetricsLog, this.sql);
         }
     
    +    private void loggingAutoCommitHelper() throws SQLException {
    +        Connection conn = this.getConnection();
    +
    +        if(stmt.getUpdateOperation().isMutation() && conn.getAutoCommit()){
    +            phoenixMetricsLog.logWriteMetricsfoForMutationsSinceLastReset(
    +                    
PhoenixRuntime.getWriteMetricInfoForMutationsSinceLastReset(conn));
    +            phoenixMetricsLog.logReadMetricInfoForMutationsSinceLastReset(
    +                    
PhoenixRuntime.getReadMetricInfoForMutationsSinceLastReset(conn));
    +            PhoenixRuntime.resetMetrics(conn);
    +        }
    +        return;
    --- End diff --
    
    nit: not needed


---

Reply via email to