jasonk000 commented on a change in pull request #12097:
URL: https://github.com/apache/druid/pull/12097#discussion_r818173605



##########
File path: 
indexing-service/src/main/java/org/apache/druid/indexing/overlord/TaskRunner.java
##########
@@ -88,11 +89,19 @@
    */
   void shutdown(String taskid, String reason);
 
-  default void shutdown(String taskid, String reasonFormat, Object... args)
+  default void shutdown(String taskid, String reasonFormat, Object... 
reasonArgs)
   {
-    shutdown(taskid, StringUtils.format(reasonFormat, args));
+    // only calculate the 'reason' string for debug level logging
+    // in large clusters the 'reasonArgs' may be very large / expensive if it 
includes a list of tasks
+    String reason = (getLogger().isDebugEnabled()) ? 
StringUtils.format(reasonFormat, reasonArgs) : "debug log disabled";

Review comment:
       I like this solution, I'll swap over to this implementation.




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