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

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

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. 
   I am not sure how total time in case of invalidation failure using the same 
metric will be helpful? Please let me know.





> 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