tkhurana commented on code in PR #1546:
URL: https://github.com/apache/phoenix/pull/1546#discussion_r1066468936


##########
phoenix-core/src/main/java/org/apache/phoenix/execute/MutationState.java:
##########
@@ -1480,8 +1500,10 @@ public List<Mutation> getMutationList() {
                         
GLOBAL_MUTATION_INDEX_COMMIT_FAILURE_COUNT.update(numFailedPhase3Mutations);
                     }
                 } finally {
-                    mutationCommitTime = 
EnvironmentEdgeManager.currentTimeMillis() - startTime;
-                    GLOBAL_MUTATION_COMMIT_TIME.update(mutationCommitTime);
+                    if (mutationCommitTime != 0) {

Review Comment:
   Didn't understand this check



##########
phoenix-core/src/main/java/org/apache/phoenix/execute/MutationState.java:
##########
@@ -947,20 +963,24 @@ private long validateAndGetServerTimestamp(TableRef 
tableRef, MultiRowMutationSt
                     }
                     for (PColumn column : columns) {
                         if (column != null) {
-                            
resolvedTable.getColumnFamily(column.getFamilyName().getString()).getPColumnForColumnName(
-                                    column.getName().getString());
+                            
resolvedTable.getColumnFamily(column.getFamilyName().getString())
+                                    
.getPColumnForColumnName(column.getName().getString());
                         }
                     }
                 }
             }
-        } catch(Throwable e) {
-            if(table != null) {
-                
TableMetricsManager.updateMetricsForSystemCatalogTableMethod(table.getTableName().toString(),
-                        NUM_METADATA_LOOKUP_FAILURES, 1);
+        } catch (Throwable e) {
+            if (table != null) {
+                TableMetricsManager.updateMetricsForSystemCatalogTableMethod(
+                    table.getTableName().toString(), 
NUM_METADATA_LOOKUP_FAILURES, 1);
             }
             throw e;
+        } finally {
+            long endTime = EnvironmentEdgeManager.currentTimeMillis();
+            GLOBAL_MUTATION_SYSCAT_TIME.update(endTime - startTime);

Review Comment:
   This looks good



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@phoenix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to