cryptoe commented on code in PR #17739:
URL: https://github.com/apache/druid/pull/17739#discussion_r1972906326


##########
extensions-core/kubernetes-overlord-extensions/src/main/java/org/apache/druid/k8s/overlord/KubernetesPeonLifecycle.java:
##########
@@ -286,16 +290,16 @@ protected TaskLocation getTaskLocation()
         log.warn("Could not get task location from k8s for task [%s].", 
taskId);
         return TaskLocation.unknown();
       }
-      taskLocation = TaskLocation.create(
+      taskLocationRef.set(TaskLocation.create(

Review Comment:
   even if multiple threads call taksLocationRef.set() that operation is 
inherently threadsafe since we are using an atomic reference. 
   earlier we were using a normal variable where multiple threads are accessing 
this variable which leads to weird races where one thread sets the variable but 
its not visible to the other thread. 



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