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

ASF GitHub Bot commented on PHOENIX-7111:
-----------------------------------------

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.





> Metrics for server-side metadata cache
> --------------------------------------
>
>                 Key: PHOENIX-7111
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-7111
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: Palash Chauhan
>            Assignee: Palash Chauhan
>            Priority: Major
>
> Add metrics for monitoring the new metadata caching design. 
>  # Time taken to invalidate cache on all region servers during a DDL operation
>  # Number of failed DDL operations due to failure in cache invalidation
>  # Number of validateLastDDLTimestamp requests per region-server
>  # Cache hits/misses per region-server when validating timestamps



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to