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


##########
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:
   Hi @cryptoe, if i am understanding correctly, your changes will prevent `if 
(taskLocation == null)` from executing when taskLocation is writing right? It 
is still possible for multiple threads to call `taskLocationRef.set()` right? 
   
   I believe it is not trivial (at least to me) what you are trying to fix with 
the changes. Maybe can provide an example where the race will cause the user to 
face problems? 😄



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