findingrish commented on code in PR #14985:
URL: https://github.com/apache/druid/pull/14985#discussion_r1375241460


##########
server/src/main/java/org/apache/druid/segment/metadata/AbstractSegmentMetadataCache.java:
##########
@@ -385,55 +329,26 @@ private void startCacheExec()
     );
   }
 
+  private void setInitializedAndReportInitTime(Stopwatch stopwatch)
+  {
+    // report the cache init time
+    if (initialized.getCount() == 1) {
+      long elapsedTime = stopwatch.elapsed(TimeUnit.MILLISECONDS);
+      
emitter.emit(ServiceMetricEvent.builder().setMetric("metadatacache/init/time", 
elapsedTime));
+      log.info("%s initialized in [%,d] ms.", getClass().getSimpleName(), 
elapsedTime);
+      stopwatch.stop();
+    }
+    initialized.countDown();
+  }
+
   @LifecycleStart
   public void start() throws InterruptedException
   {
+    log.info("%s waiting for initialization.", getClass().getSimpleName());
     startCacheExec();
 
     if (config.isAwaitInitializationOnStart()) {

Review Comment:
   I wanted this message to be logged irrespective of the 
`isAwaitInitializationOnStart` config, since this config is `false` by default 
on Coordinator. 
   I am changing the message to `%s starting cache initialization.` 



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to