palashc commented on code in PR #1744:
URL: https://github.com/apache/phoenix/pull/1744#discussion_r1418514264


##########
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java:
##########
@@ -3490,7 +3496,11 @@ private void 
invalidateServerMetadataCache(List<InvalidateServerMetadataCacheReq
             // This will incur an extra RPC to the master. This RPC is 
required since we want to
             // get current list of regionservers.
             Collection<ServerName> serverNames = admin.getRegionServers(true);
+            PhoenixStopWatch stopWatch = new PhoenixStopWatch().start();
             invalidateServerMetadataCacheWithRetries(admin, serverNames, 
requests, false);
+            metricsMetadataCachingSource
+                    
.addMetadataCacheInvalidationTotalTime(stopWatch.stop().elapsedMillis());
+            
metricsMetadataCachingSource.incrementMetadataCacheInvalidationSuccessCount();

Review Comment:
   I was thinking to derive it but I guess it will be easier to just have the 
metric explicitly, so I will add one for failure count and also total time in 
that case. 
   Btw, I am not sure how total time in case of invalidation failure using the 
same metric will be helpful? Please let me know.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to