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


##########
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:
   > Btw, I am not sure how total time in case of invalidation failure using 
the same metric will be helpful?
   
   IMO SYSCAT regionserver spent this much time in invalidating the cache, 
irrespective of the outcome. If we want to track the success and failure 
scenario separately then we can create 2 more metrics. But the total time 
should include the time spent in failure case also.



-- 
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