georgew5656 commented on code in PR #14285:
URL: https://github.com/apache/druid/pull/14285#discussion_r1198126384


##########
extensions-contrib/kubernetes-overlord-extensions/src/main/java/org/apache/druid/k8s/overlord/KubernetesPeonLifecycle.java:
##########
@@ -265,14 +268,32 @@ private TaskStatus getTaskStatus(long duration)
     return taskStatus.withDuration(duration);
   }
 
-  private void saveLogs()
+  protected void startWatchingLogs()
+  {
+    if (logWatch != null) {
+      log.debug("There is already a log watcher for %s", 
taskId.getOriginalTaskId());
+      return;
+    }
+    try {
+      Optional<LogWatch> maybeLogWatch = 
kubernetesClient.getPeonLogWatcher(taskId);
+      if (maybeLogWatch.isPresent()) {

Review Comment:
   this method would only ever be called by one thread running join on that 
taskId. it's possible another thread (the one running shutdown commands) runs 
startWatchingLogs as well, but I don't think that would be an issue since 
logWatch would get set twice in succession which isn't too much of an issue



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